docs: re-organize installing.md to have package as first option

- remove references to ghcr.io and internal release image

refs #1080
This commit is contained in:
Arthur Meyre
2021-12-16 14:32:54 +01:00
parent 66b9d35095
commit 0565815d5f

View File

@@ -1,48 +1,6 @@
# Installing
## Docker image
```{note}
The easiest way to install the framework is as a docker image. To get the image you need to login to ghcr.io with docker.
```
```{warning}
FIXME(Arthur): to check this is still valid
```
```shell
docker login ghcr.io
```
This command will ask for a username and a password. For username, just enter your GitHub username. For password, you should create a personal access token from [here](https://github.com/settings/tokens) selecting `read:packages` permission. Just paste the generated access token as your password, and you are good to go.
You can then either pull the latest docker image or a specific version:
```shell
docker pull ghcr.io/zama-ai/concretefhe:latest
# or
docker pull ghcr.io/zama-ai/concretefhe:v0.1.0
```
You can then use this image with the following command:
```shell
# Without local volume:
docker run --rm -it -p 8888:8888 ghcr.io/zama-ai/concretefhe:v0.1.0
# With local volume to save notebooks on host:
docker run --rm -it -p 8888:8888 -v /host/path:/data ghcr.io/zama-ai/concretefhe:v0.1.0
```
This will launch a **Concrete** enabled jupyter server in the docker, that you can access from your browser.
Alternatively you can just open a shell in the docker:
```shell
docker run --rm -it ghcr.io/zama-ai/concretefhe:v0.1.0 /bin/bash
```
## python package
## Python package
To install **Concrete** from PyPi run the following:
@@ -51,13 +9,18 @@ pip install concretefhe
```
```{note}
Note that concretefhe has `pygraphviz` as an optional dependency to draw graphs.
Note that **concretefhe** has `pygraphviz` as an optional dependency to draw graphs.
```
```{WARNING}
`pygraphviz` requires `graphviz` packages being installed on your OS, see <a href="https://pygraphviz.github.io/documentation/stable/install.html">https://pygraphviz.github.io/documentation/stable/install.html</a>
```
```{DANGER}
`graphviz` packages are binary packages that won't automatically be installed by pip.
Do check <a href="https://pygraphviz.github.io/documentation/stable/install.html">https://pygraphviz.github.io/documentation/stable/install.html</a> for instructions on how to install `graphviz` for `pygraphviz`.
```
You can install the extra python dependencies for drawing with:
```shell
@@ -65,3 +28,33 @@ pip install concretefhe[full]
# you may need to force reinstallation
pip install --force-reinstall concretefhe[full]
```
## Docker image
You can also get the **concretefhe** docker image by either pulling the latest docker image or a specific version:
```shell
docker pull zamafhe/concretefhe:latest
# or
docker pull zamafhe/concretefhe:v0.2.0
```
The image can be used with docker volumes, [see the docker documentation here](https://docs.docker.com/storage/volumes/).
You can then use this image with the following command:
```shell
# Without local volume:
docker run --rm -it -p 8888:8888 zamafhe/concretefhe:v0.2.0
# With local volume to save notebooks on host:
docker run --rm -it -p 8888:8888 -v /host/path:/data zamafhe/concretefhe:v0.2.0
```
This will launch a **Concrete** enabled jupyter server in the docker, that you can access from your browser.
Alternatively you can just open a shell in the docker with or without volumes:
```shell
docker run --rm -it zamafhe/concretefhe:v0.2.0 /bin/bash
```