Deepo is a series of Docker images that
- allows you to quickly set up your deep learning research environment
- supports almost all commonly used deep learning frameworks
- supports GPU acceleration (CUDA and cuDNN included), also works in CPU-only mode
- works on Linux (CPU version/GPU version), Windows (CPU version) and OS X (CPU version)
and their Dockerfile generator that
- allows you to customize your own environment with Lego-like modules
- automatically resolves the dependencies for you
. | GPU / Python 3.6 | GPU / Python 2.7 | CPU-only / Python 3.6 | CPU-only / Python 2.7 |
---|---|---|---|---|
all-in-one | all-py36 all py36 latest |
all-py27 py27 |
all-py36-cpu all-cpu py36-cpu cpu |
all-py27-cpu py27-cpu |
all-in-one with jupyter | all-py36-jupyter py36-jupyter |
all-py27-jupyter py27-jupyter |
all-py36-jupyter-cpu py36-jupyter-cpu |
all-py27-jupyter-cpu py27-jupyter-cpu |
theano | theano-py36 theano |
theano-py27 |
theano-py36-cpu theano-cpu |
theano-py27-cpu |
tensorflow | tensorflow-py36 tensorflow |
tensorflow-py27 |
tensorflow-py36-cpu tensorflow-cpu |
tensorflow-py27-cpu |
sonnet | sonnet-py36 sonnet |
sonnet-py27 |
sonnet-py36-cpu sonnet-cpu |
sonnet-py27-cpu |
pytorch | pytorch-py36 pytorch |
pytorch-py27 |
pytorch-py36 pytorch |
pytorch-py27 |
keras | keras-py36 keras |
keras-py27 |
keras-py36-cpu keras-cpu |
keras-py27-cpu |
lasagne | lasagne-py36 lasagne |
lasagne-py27 |
lasagne-py36-cpu lasagne-cpu |
lasagne-py27-cpu |
mxnet | mxnet-py36 mxnet |
mxnet-py27 |
mxnet-py36-cpu mxnet-cpu |
mxnet-py27-cpu |
cntk | cntk-py36 cntk |
cntk-py27 |
cntk-py36-cpu cntk-cpu |
cntk-py27-cpu |
chainer | chainer-py36 chainer |
chainer-py27 |
chainer-py36-cpu chainer-cpu |
chainer-py27-cpu |
caffe | caffe-py36 caffe |
caffe-py27 |
caffe-py36-cpu caffe-cpu |
caffe-py27-cpu |
torch | torch |
torch |
torch-cpu |
torch-cpu |
Step 1. Install Docker and nvidia-docker.
Step 2. Obtain the all-in-one image from Docker Hub
docker pull ufoym/deepo
Now you can try this command:
nvidia-docker run --rm ufoym/deepo nvidia-smi
This should work and enables Deepo to use the GPU from inside a docker container. If this does not work, search the issues section on the nvidia-docker GitHub -- many solutions are already documented. To get an interactive shell to a container that will not be automatically deleted after you exit do
nvidia-docker run -it ufoym/deepo bash
If you want to share your data and configurations between the host (your machine or VM) and the container in which you are using Deepo, use the -v option, e.g.
nvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo bash
This will make /host/data
from the host visible as /data
in the container, and /host/config
as /config
. Such isolation reduces the chances of your containerized experiments overwriting or using wrong data.
Please note that some frameworks (e.g. PyTorch) use shared memory to share data between processes, so if multiprocessing is used the default shared memory segment size that container runs with is not enough, and you should increase shared memory size either with --ipc=host
or --shm-size
command line options to nvidia-docker run
.
nvidia-docker run -it --ipc=host ufoym/deepo bash
Step 1. Install Docker.
Step 2. Obtain the all-in-one image from Docker Hub
docker pull ufoym/deepo:cpu
Now you can try this command:
docker run -it ufoym/deepo:cpu bash
If you want to share your data and configurations between the host (your machine or VM) and the container in which you are using Deepo, use the -v option, e.g.
docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo:cpu bash
This will make /host/data
from the host visible as /data
in the container, and /host/config
as /config
. Such isolation reduces the chances of your containerized experiments overwriting or using wrong data.
Please note that some frameworks (e.g. PyTorch) use shared memory to share data between processes, so if multiprocessing is used the default shared memory segment size that container runs with is not enough, and you should increase shared memory size either with --ipc=host
or --shm-size
command line options to docker run
.
docker run -it --ipc=host ufoym/deepo:cpu bash
You are now ready to begin your journey.
$ python
>>> import tensorflow
>>> import sonnet
>>> import torch
>>> import keras
>>> import mxnet
>>> import cntk
>>> import chainer
>>> import theano
>>> import lasagne
>>> import caffe
$ caffe --version
caffe version 1.0.0
$ th
│ ______ __ | Torch7
│ /_ __/__ ________/ / | Scientific computing for Lua.
│ / / / _ \/ __/ __/ _ \ | Type ? for help
│ /_/ \___/_/ \__/_//_/ | https://github.com/torch
│ | http://torch.ch
│
│th>
Note that docker pull ufoym/deepo
mentioned in Quick Start will give you a standard image containing all available deep learning frameworks. You can customize your own environment as well.
If you prefer a specific framework rather than an all-in-one image, just append a tag with the name of the framework. Take tensorflow for example:
docker pull ufoym/deepo:tensorflow
Note that all python-related images use Python 3.6
by default. If you are unhappy with Python 3.6
, you can also specify other python versions:
docker pull ufoym/deepo:py27
docker pull ufoym/deepo:tensorflow-py27
Currently, we support Python 2.7
and Python 3.6
.
See Available Tags for a complete list of all available tags. These pre-built images are all built from docker/Dockerfile.*
and circle.yml
. See How to generate docker/Dockerfile.*
and circle.yml
if you are interested in how these files are generated.
docker pull ufoym/deepo:all-py36-jupyter
Note that the tag could be either of all-py36-jupyter
, py36-jupyter
, all-py27-jupyter
, or py27-jupyter
.
nvidia-docker run -it -p 8888:8888 ufoym/deepo:all-py36-jupyter jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'
git clone https://github.com/ufoym/deepo.git
cd deepo/generator
pip install -r requirements.txt
For example, if you like pytorch
and lasagne
, then
python generate.py Dockerfile pytorch lasagne
This should generate a Dockerfile that contains everything for building pytorch
and lasagne
. Note that the generator can handle automatic dependency processing and topologically sort the lists. So you don't need to worry about missing dependencies and the list order.
You can also specify the version of Python:
python generate.py Dockerfile pytorch lasagne python==3.6
docker build -t my/deepo .
This may take several minutes as it compiles a few libraries from scratch.
. | modern-deep-learning | dl-docker | jupyter-deeplearning | Deepo |
---|---|---|---|---|
ubuntu | 16.04 | 14.04 | 14.04 | 16.04 |
cuda | ❌ | 8.0 | 6.5-8.0 | 8.0 |
cudnn | ❌ | v5 | v2-5 | v6 |
theano | ❌ | ✔️ | ✔️ | ✔️ |
tensorflow | ✔️ | ✔️ | ✔️ | ✔️ |
sonnet | ❌ | ❌ | ❌ | ✔️ |
pytorch | ❌ | ❌ | ❌ | ✔️ |
keras | ✔️ | ✔️ | ✔️ | ✔️ |
lasagne | ❌ | ✔️ | ✔️ | ✔️ |
mxnet | ❌ | ❌ | ❌ | ✔️ |
cntk | ❌ | ❌ | ❌ | ✔️ |
chainer | ❌ | ❌ | ❌ | ✔️ |
caffe | ✔️ | ✔️ | ✔️ | ✔️ |
torch | ❌ | ✔️ | ✔️ | ✔️ |
We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.
Deepo is MIT licensed.