mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
docs: Re-organize installation docs
- add user docs to use concretefhe with docker
This commit is contained in:
35
README.md
35
README.md
@@ -2,25 +2,40 @@
|
||||
|
||||
Concrete Framework Python API - collection of tools to FHE all the things
|
||||
|
||||
## Installing
|
||||
<!-- TOC -->
|
||||
|
||||
Installation steps are described in [INSTALLING.md](docs/install/INSTALLING.md).
|
||||
- [concretefhe](#concretefhe)
|
||||
- [For end users](#for-end-users)
|
||||
- [Using the project](#using-the-project)
|
||||
- [For developers](#for-developers)
|
||||
- [Project setup](#project-setup)
|
||||
- [Documenting](#documenting)
|
||||
- [Developing](#developing)
|
||||
- [Contributing](#contributing)
|
||||
|
||||
## Using Docker
|
||||
<!-- /TOC -->
|
||||
|
||||
Information about how to use Docker are available in [DOCKER.md](docs/install/DOCKER.md).
|
||||
## For end users
|
||||
|
||||
## Documenting
|
||||
### Using the project
|
||||
|
||||
Some information about how to build the documentation of `concretefhe` are available in [DOCUMENTING.md](docs/dev/DOCUMENTING.md). Notably, our documentation is pushed to [https://hdk.zama.ai](https://hdk.zama.ai).
|
||||
To use the project you can check [INSTALLING.md](docs/user/howto/INSTALLING.md)
|
||||
|
||||
## Developping
|
||||
## For developers
|
||||
|
||||
Some information about our terminology and the infrastructure of `concretefhe` are available in [TERMINOLOGY_AND_STRUCTURE.md](docs/dev/TERMINOLOGY_AND_STRUCTURE.md). An in-depth look at what is done in `concretefhe` is available in [COMPILATION.md](docs/dev/COMPILATION.md).
|
||||
### Project setup
|
||||
|
||||
## Contributing
|
||||
Installation steps are described in [PROJECT_SETUP.md](docs/dev/howto/PROJECT_SETUP.md).
|
||||
Information about how to use Docker for development are available in [DOCKER.md](docs/dev/howto/DOCKER.md).
|
||||
|
||||
Information about how to contribute are available in [CONTRIBUTING.md](docs/dev/CONTRIBUTING.md).
|
||||
### Documenting
|
||||
|
||||
Some information about how to build the documentation of `concretefhe` are available in [DOCUMENTING.md](docs/dev/howto/DOCUMENTING.md). Notably, our documentation is pushed to [https://hdk.zama.ai](https://hdk.zama.ai).
|
||||
|
||||
### Developing
|
||||
|
||||
Some information about our terminology and the infrastructure of `concretefhe` are available in [TERMINOLOGY_AND_STRUCTURE.md](docs/dev/explanation/TERMINOLOGY_AND_STRUCTURE.md). An in-depth look at what is done in `concretefhe` is available in [COMPILATION.md](docs/dev/explanation/COMPILATION.md).
|
||||
|
||||
### Contributing
|
||||
|
||||
Information about how to contribute are available in [CONTRIBUTING.md](docs/dev/howto/CONTRIBUTING.md).
|
||||
|
||||
@@ -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