README/setup: Add steps for using public Docker images. (#19)

This commit is contained in:
Justin D. Harris 2019-07-11 15:10:22 -04:00 коммит произвёл GitHub
Родитель 10d8ee6aeb
Коммит c8cb40b1b5
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 15 добавлений и 4 удалений

Просмотреть файл

@ -23,13 +23,18 @@ Run
## Docker Setup
You can use a Docker image by running:
```bash
docker build -t decai-demo .
docker run --rm -it -p 3000:3000 -p 5387:5387 -p 7545:7545 -v ${PWD}:/root/workspace/demo -v /root/workspace/demo/node_modules -v /root/workspace/demo/client/node_modules --name decai-demo decai-demo bash
docker run --rm -it -p 3000:3000 -p 5387:5387 -p 7545:7545 -v ${PWD}:/root/workspace/demo -v /root/workspace/demo/node_modules -v /root/workspace/demo/client/node_modules --name decai-demo mcr.microsoft.com/samples/blockchain-ai/0xdeca10b-demo bash
# So that you can start a few processes in the Docker container, run:
byobu
```
### Building the Docker Image
If you want to build your own fresh image:
```bash
docker build -t decai-demo .
```
## Troubleshooting Setup
If you have problems running the setup steps related to node-gyp, then you might need to set Python 2.7 to be your default. Recommendation: Set up a Python 2.7 Conda environment and activate it.

Просмотреть файл

@ -27,6 +27,7 @@ The adversary is only submitting data about one sixth as often.
Despite the malicious efforts, the accuracy can still be maintained and the honest contributors profit.
# Setup
This section explains how to set up locally, alternatively, you can skip ahead and use a Docker image.
Run:
```bash
conda create --channel conda-forge --name decai-simulation python=3.7 bokeh ipython mkl mkl-service numpy phantomjs scikit-learn scipy six tensorflow
@ -35,10 +36,15 @@ pip install -e .
```
## Docker Setup
You can use Docker by running:
You can use a Docker image by running:
```bash
docker run --rm -it -p 5006:5006 -v ${PWD}:/root/workspace/0xDeCA10B/simulation --name decai-simulation mcr.microsoft.com/samples/blockchain-ai/0xdeca10b-simulation bash
```
### Building the Docker Image
If you want to build your own fresh image:
```bash
docker build -t decai-simulation .
docker run --rm -it -p 5006:5006 -v ${PWD}:/root/workspace/0xDeCA10B/simulation --name decai-simulation decai-simulation bash
```
# Running Simulations