mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
docs: Re-organize installation docs
- add user docs to use concretefhe with docker
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
# Installing
|
||||
# Project Setup
|
||||
|
||||
## Installing Python v3.8
|
||||
|
||||
@@ -7,8 +7,6 @@ Homomorphic Development Kit's documentation
|
||||
:caption: Basics
|
||||
|
||||
README.md
|
||||
install/INSTALLING.md
|
||||
install/DOCKER.md
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
@@ -22,6 +20,7 @@ Homomorphic Development Kit's documentation
|
||||
:maxdepth: 2
|
||||
:caption: How to
|
||||
|
||||
user/howto/INSTALLING.md
|
||||
user/howto/COMPILE.md
|
||||
user/howto/REDUCE_NEEDED_PRECISION.md
|
||||
user/howto/DEBUG_SUPPORT_SUBMIT_ISSUES.md
|
||||
@@ -46,6 +45,8 @@ Homomorphic Development Kit's documentation
|
||||
:maxdepth: 2
|
||||
:caption: Developper - How To
|
||||
|
||||
dev/howto/PROJECT_SETUP.md
|
||||
dev/howto/DOCKER.md
|
||||
dev/howto/DOCUMENTING.md
|
||||
Releasing on GitHub <dev/howto/RELEASING.md>
|
||||
dev/howto/CONTRIBUTING.md
|
||||
@@ -58,4 +59,3 @@ Homomorphic Development Kit's documentation
|
||||
dev/explanation/TERMINOLOGY_AND_STRUCTURE.md
|
||||
dev/explanation/FLOAT-FUSING.md
|
||||
dev/explanation/MLIR.md
|
||||
|
||||
50
docs/user/howto/INSTALLING.md
Normal file
50
docs/user/howto/INSTALLING.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Installing
|
||||
|
||||
## Docker image
|
||||
|
||||
Currently the project is only available as a docker image. To get the image you need to login to ghcr.io with docker.
|
||||
|
||||
```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-internal:latest
|
||||
# or
|
||||
docker pull ghcr.io/zama-ai/concretefhe-internal: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-internal: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-internal:v0.1.0
|
||||
```
|
||||
|
||||
This will launch a concretefhe 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-internal:v0.1.0 /bin/bash
|
||||
|
||||
root@e2d6c00e2f3d:/data# python3
|
||||
Python 3.8.10 (default, Jun 2 2021, 10:49:15)
|
||||
[GCC 9.4.0] on linux
|
||||
Type "help", "copyright", "credits" or "license" for more information.
|
||||
>>> import concrete.numpy as hnp
|
||||
>>> dir(hnp)
|
||||
['ClearScalar', 'ClearTensor', 'CompilationArtifacts', 'CompilationConfiguration', 'EncryptedScalar', 'EncryptedTensor', 'Float', 'Float32', 'Float64', 'Integer', 'LookupTable', 'ScalarValue', 'SignedInteger', 'TensorValue', 'UnsignedInteger', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'compile', 'compile_numpy_function', 'compile_numpy_function_into_op_graph', 'draw_graph', 'get_printable_graph', 'np_dtypes_helpers', 'trace_numpy_function', 'tracing']
|
||||
>>>
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user