Develop:
Master:
Just use the makefile to clone the repos from github:
make clone-all
clone-all
can take the following arguments:
Example:
make clone-all BRANCH=master
BRANCH
| default = developAnd build all the images:
make build
Build can take the following arguments:
SGX_MODE
| default = HWDEBUG
| default = 0 Example:
make build SGX_MODE=SW DEBUG=0
The following make targets also exist:
Copy .env.template
to .env
and adjust any values as needed:
cp .env.template .env
Software mode:
docker-compose up
Hardware mode:
docker-compose -f docker-compose.yml -f docker-compose.hw.yml up
** Current develop is still kind of bugged, so it won't actually run all the tests successfully
The compose by default comes with a client you can use to run tests on the cluster. To use, just exec make test
in the client
docker-compose exec client make test
docker-compose scale worker=X
Be careful you have enough memory to run all those workers though!
core
and p2p
:
docker build -f gitclone_core.Dockerfile -t gitclone_core .
docker build -f gitclone_p2p.Dockerfile -t gitclone_p2p .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_core.Dockerfile -t gitclone_core --build-arg branch=develop .
docker build -f gitclone_p2p.Dockerfile -t gitclone_p2p --build-arg branch=develop .
(Optional) Build base image:
docker build --build-arg DEBUG=1 --build-arg SGX_MODE=SW -f 01_core_base.Dockerfile -t enigmampc/core-base:latest .
Build worker image:
docker build --build-arg SGX_MODE=SW -f 02_core_and_p2p.Dockerfile -t enigmampc/worker-minimal:latest .
Build custom image based off baidu image:
docker build -f baidu1804.Dockerfile -t baiduxlab/sgx-rust:1804-1.0.9 .
Recompile SGX binaries. Will be useful if we want to move off Ubuntu 18.04:
docker build -f buildSGX.Dockerfile -t buildsgx .
docker build -f gitclone_km.Dockerfile -t gitclone_km .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_km.Dockerfile -t gitclone_km --build-arg branch=develop .
(Optional) Build base image:
docker build --build-arg SGX_MODE=SW -f 01_core_base.Dockerfile -t enigmampc/core-base:latest .
Build Key Management image:
docker build --build-arg SGX_MODE=SW -f km.Dockerfile -t enigmampc/key_management:latest .
docker build -f gitclone_contract.Dockerfile -t gitclone_contract .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_contract.Dockerfile -t gitclone_contract --build-arg branch=develop .
docker build --build-arg SGX_MODE=SW -f contract.Dockerfile -t enigmampc/contract:latest .
Build enigma_common
Docker image:
cd common_scripts/
docker build -f common.Dockerfile -t enigma_common .
cd ..
Clone integration-tests
from Github:
cd client
docker build -f gitclone_integration.Dockerfile -t gitclone_integration .
Note: it's possible to change each image to pull from a branch, for example develop
:
docker build -f gitclone_integration.Dockerfile -t gitclone_integration --build-arg branch=develop .
docker build -f client.Dockerfile -t enigmampc/client:latest .
Clone this repository. If cloned into Pycharm you should get all the build configurations for free
Each image uses the following: