You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
Add a series of Docker images, and their Dockerfile generator thatallows you to customize your own environment with Lego-like modules, andautomatically resolves the dependencies for you.
***Deepo*** is a[*Docker*](http://www.docker.com/) image with a full reproducible deep learning research environment. It contains most popular deep learning frameworks:
***Deepo*** is a series of[*Docker*](http://www.docker.com/) images that
9
+
- allows you to quickly set up your deep learning research environment
10
+
- supports almost all commonly used deep learning frameworks:[theano](http://deeplearning.net/software/theano),[tensorflow](http://www.tensorflow.org),[sonnet](https://github.com/deepmind/sonnet),[pytorch](http://pytorch.org),[keras](https://keras.io),[lasagne](http://lasagne.readthedocs.io),[mxnet](http://mxnet.incubator.apache.org),[cntk](https://www.microsoft.com/en-us/cognitive-toolkit),[chainer](https://chainer.org),[caffe](http://caffe.berkeleyvision.org),[torch](http://torch.ch/)
19
11
12
+
and their Dockerfile generator that
13
+
- allows you to customize your own environment with Lego-like modules
You can either directly download the image from Docker Hub, or build the image yourself.
42
+
####Step 2. Obtain the all-in-one image from[Docker Hub](https://hub.docker.com/r/ufoym/deepo)
42
43
43
-
#####Option 1: Get the image from Docker Hub (recommended)
44
44
```bash
45
45
docker pull ufoym/deepo
46
46
```
47
-
#####Option 2: Build the Docker image locally
48
-
```bash
49
-
git clone https://github.com/ufoym/deepo.git
50
-
cd deepo&& docker build -t ufoym/deepo.
51
-
```
52
-
Note that this may take several hours as it compiles a few libraries from scratch.
53
47
54
48
<aname="Usage"/>
55
49
56
-
###Usage
50
+
##Usage
57
51
58
52
Now you can try this command:
59
53
```bash
@@ -72,96 +66,34 @@ nvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo ba
72
66
```
73
67
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.
74
68
69
+
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`.
Note that`docker pull ufoym/deepo` mentioned in[Quick Start](#Quick-Start) will give you a standard image containing all available deep learning frameworks. You can customize your own environment as well.
114
+
115
+
<aname="One"/>
116
+
117
+
##I hate all-in-one solution
118
+
119
+
If you prefer a specific framework rather than an all-in-one image, just append a tag with the name of the framework.
120
+
Take tensorflow for example:
121
+
```bash
122
+
docker pull ufoym/deepo:tensorflow
123
+
```
124
+
125
+
<aname="Python"/>
126
+
127
+
##Other python versions
128
+
129
+
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:
130
+
```bash
131
+
docker pull ufoym/deepo:py27
132
+
```
133
+
134
+
```bash
135
+
docker pull ufoym/deepo:tensorflow-py27
136
+
```
137
+
138
+
Currently, we support`Python 2.7` and`Python 3.6`.
139
+
140
+
See[https://hub.docker.com/r/ufoym/deepo/tags/](https://hub.docker.com/r/ufoym/deepo/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`](https://github.com/ufoym/deepo/tree/master/scripts) if you are interested in how these files are generated.
141
+
142
+
<aname="Build"/>
143
+
144
+
##Build your own customized image with Lego-like modules
145
+
146
+
####Step 1. prepare generator
147
+
148
+
```bash
149
+
git clone https://github.com/ufoym/deepo.git
150
+
cd deepo/generator
151
+
pip install -r requirements.txt
152
+
```
153
+
154
+
####Step 2. generate your customized Dockerfile
155
+
156
+
For example, if you like`pytorch` and`lasagne`, then
157
+
```bash
158
+
python generate.py Dockerfile pytorch lasagne
159
+
```
160
+
161
+
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.
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.