Addition of gpu dockerfile (and small update in wiki).
@@ -34,12 +34,42 @@ Run the Elpis Docker image. Mount your local repositories into the container. Le
docker run -it -p 5000:5000/tcp \
-v ~/elpis-sandbox/elpis:/elpis \
-v ~/elpis-sandbox/elpis-gui:/elpis-gui \
- -v ~/elpis-sandbox/persephone:/elpis/persephone \
-v ~/elpis-sandbox/espnet/egs/elpis:/espnet/egs/elpis \
- --entrypoint /bin/bash \
+ -v ~/elpis-sandbox/espnet/utils/:/espnet/utils/ \
+ --entrypoint /bin/zsh \
coedl/elpis:latest
```
+### CUDA (beta, for ESPnet).
+
+If you have a CUDA-compatible GPU it is possible to achieve better performance by utilising the GPU in training your models. For this purpose, CUDA drivers must be installed on host machine (look if `nvidia-smi` works), and you can try the CUDA-specific Dockerfile (`gpu/Dockerfile` in root folder):
+
+```
+cd ~/elpis-sandbox/elpis
+docker build . --file gpu/Dockerfile --tag coedl/elpis-cuda:latest > build.log
+```
+
+(It will write all logs in `build.log` file, because it is not so trivial to make it work flawlessly.)
+
+Then, run it by adding the `--gpus all` argument in `docker run`:
+
+```
+docker run --gpus all -it -p 5000:5000/tcp \
+ -v ~/elpis-sandbox/elpis:/elpis \
+ -v ~/elpis-sandbox/elpis-gui:/elpis-gui \
+ -v ~/elpis-sandbox/espnet/egs/elpis:/espnet/egs/elpis \
+ -v ~/elpis-sandbox/espnet/utils/:/espnet/utils/ \
+ --entrypoint /bin/zsh
+ coedl/elpis-cuda:latest
+```
+
+After, to be sure that CUDA mode for model training is enabled, check in the `elpis-sandbox/elpis/elpis/engines/espnet/objects/model.py` file that the command includes the `--ngpu x` (x is the number of GPUs) argument as:
+
+```
+p = run(f"cd {local_espnet_path}; ./run.sh --nj 1 --ngpu 1 &> {run_log_path}")
+```
+
+**This feature is currently in a beta stage. Utilising the GPU for training is only currently recommended for those who know what they're doing or those particularly interested in achieving higher performance.**
## Run the app
@@ -51,6 +81,11 @@ python setup.py develop
export FLASK_APP=elpis && flask run --host=0.0.0.0 --port=5000
```
+You can also simply use the alias command inside the container.
+```
+run
+```
+
## Monitor the app/code
