cd ~/tutorial-metarl/
python -m venv pytorch-gpu
source pytorch-gpu/bin/activate
pip3 install -r requirements.txt
pip3 install -e .
docker build -t tutorial_metarl .
add line JUPYTER_PASSWORD=tutorial_metarl
docker run --rm -d --name dev_user --env-file .env -v "/path/to/tutorial_metarl/:/notebooks/" -w "/notebooks/" -p 1236:8888 --runtime nvidia -e NVIDIA_VISIBLE_DEVICES=0 tutorial_metarl:latest
docker run --rm -d --name dev_user --env-file .env -v "/path/to/tutorial_metarl/:/notebooks/" -w "/notebooks/" -p 1236:8888 tutorial_metarl:latest
Now, the notebooks should be accessble at the port 1236 (on your PC http://localhost:1236/lab?
or on the server http://your.server.ip.address:1236
).
Note: building docker container takes time and space as it includes a lot of other libraries often used in deep learning. But it can easily be reused as base image for your other containers.
conda install PyTorch -c PyTorch
python3 setup.py install