Docker files for my deep learning env, with CUDA-supported-PyTorch, fastai, Tensorflow, Keras etc.
开箱即用的深度学习环境(含有 jupyter notebook, 支持CUDA的PyTorch, fastai, Tensorflow, Keras, etc. )
- common packages included(via base Docker image):
- Python3.6/Anaconda
- Tensorflow latest
- extra packages
- PyTorch latest
- fastai
- Keras
- numpy/pandas
- ...
- time zone default to Asia/Shanghai
- a default password
- GUI-based
nbextension_configurator
- auto-build at https://hub.docker.com/r/koyo922/dl-env/
- NB: add something like
-e "TZ=Asia/Shanghai"
and rebuild the image, if you need to use another time zone setting
mkdir -p ~/workspace/home/me && cd ~/workspace # NB: IT IS NECESSARY
docker run --gpus all -it -p 8888:8888 -p 8000-8100:8000-8100 \
-u $(id -u ${USER}):$(id -g ${USER}) \
-v $PWD:/workspace -v $PWD/home/me:/home/me -w /workspace \
--name dl \
koyo922/dl-env:gpu
# for older version `docker`, use `nvidia-docker run` instead of `docker run --gpus all`
# for CPU machine, please modify the above `nvidia-docker` into `docker`, and `koyo922/dl-env:gpu` into `koyo922/dl-env:cpu`
Note:
- How to access the jupyter server
- read the docker container output
- look for something like
http://(4cd7fac856a5 or 127.0.0.1):8888/?token=4c5bf6171097f89ced23ed52a84aced0f6f7e3a24b777554
- copy it to you web browser address bar
- modify the hostname part
(4cd7fac856a5 or 127.0.0.1)
with its Internet IP - hit enter
- To install new packages in notebooks, you need
pip install --user ...
nvidia-driver
参考官网正常安装即可。阿里云上除vgn5i
以外的GPU机器都支持自动安装驱动和CUDA,启动实例时勾上就好nvidia-docker
请参考这里安装 https://zhuanlan.zhihu.com/p/76464450