Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 29, 2023. It is now read-only.
/deepoPublic archive

Commite96f620

Browse files
committed
Add Deepo2
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.
1 parente132dd2 commite96f620

File tree

53 files changed

+3486
-259
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+3486
-259
lines changed

‎.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
55+
# Sphinx documentation
56+
docs/_build/
57+
58+
# PyBuilder
59+
target/
60+
61+
# pyenv python configuration file
62+
.python-version

‎README.md

Lines changed: 102 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,53 @@
11
![deepo](https://user-images.githubusercontent.com/2270240/32102393-aecf573c-bb4e-11e7-811c-dc673cae7b9c.png)
22

33
[![CircleCI](https://img.shields.io/circleci/project/github/ufoym/deepo.svg)](https://circleci.com/gh/ufoym/deepo)
4+
[![docker](https://img.shields.io/docker/pulls/ufoym/deepo.svg)](https://hub.docker.com/r/ufoym/deepo)
45
![license](https://img.shields.io/github/license/ufoym/deepo.svg)
56

67

7-
***Deepo*** is a[*Docker*](http://www.docker.com/) image with a full reproducible deep learning research environment. It contains most popular deep learning frameworks:
8-
[theano](http://deeplearning.net/software/theano),
9-
[tensorflow](http://www.tensorflow.org),
10-
[sonnet](https://github.com/deepmind/sonnet),
11-
[pytorch](http://pytorch.org),
12-
[keras](https://keras.io),
13-
[lasagne](http://lasagne.readthedocs.io),
14-
[mxnet](http://mxnet.incubator.apache.org),
15-
[cntk](https://www.microsoft.com/en-us/cognitive-toolkit),
16-
[chainer](https://chainer.org),
17-
[caffe](http://caffe.berkeleyvision.org),
18-
[torch](http://torch.ch/).
8+
***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/)
1911

12+
and their Dockerfile generator that
13+
- allows you to customize your own environment with Lego-like modules
14+
- automatically resolves the dependencies for you
15+
16+
17+
#Table of contents
2018
-[Quick Start](#Quick-Start)
2119
-[Installation](#Installation)
2220
-[Usage](#Usage)
21+
-[Customization](#Customization)
22+
-[I hate all-in-one solution](#One)
23+
-[Other python versions](#Python)
24+
-[Build your own customized image](#Build)
2325
-[Comparison to Alternatives](#Comparison)
26+
-[Contributing](#Contributing)
2427
-[Licensing](#Licensing)
2528

2629
---
2730

2831
<aname="Quick-Start"/>
2932

30-
##Quick Start
33+
#Quick Start
3134

3235

3336
<aname="Installation"/>
3437

35-
###Installation
38+
##Installation
3639

3740
####Step 1. Install[Docker](https://docs.docker.com/engine/installation/) and[nvidia-docker](https://github.com/NVIDIA/nvidia-docker).
3841

39-
####Step 2. Obtain the Deepo image
40-
41-
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)
4243

43-
#####Option 1: Get the image from Docker Hub (recommended)
4444
```bash
4545
docker pull ufoym/deepo
4646
```
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.
5347

5448
<aname="Usage"/>
5549

56-
###Usage
50+
##Usage
5751

5852
Now you can try this command:
5953
```bash
@@ -72,96 +66,34 @@ nvidia-docker run -it -v /host/data:/data -v /host/config:/config ufoym/deepo ba
7266
```
7367
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.
7468

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`.
70+
```bash
71+
nvidia-docker run -it --ipc=host ufoym/deepo bash
72+
```
73+
7574

7675
_You are now ready to begin your journey._
7776

7877

79-
####tensorflow
8078
```$ python```
8179
```python
8280
>>>import tensorflow
83-
>>>print(tensorflow.__name__, tensorflow.__version__)
84-
tensorflow1.3.0
85-
```
86-
87-
####sonnet
88-
```$ python```
89-
```python
9081
>>>import sonnet
91-
>>>print(sonnet.__name__, sonnet.__path__)
92-
sonnet ['/usr/local/lib/python3.5/dist-packages/sonnet']
93-
```
94-
95-
####pytorch
96-
```$ python```
97-
```python
9882
>>>import torch
99-
>>>print(torch.__name__, torch.__version__)
100-
torch0.2.0_3
101-
```
102-
103-
####keras
104-
```$ python```
105-
```python
10683
>>>import keras
107-
>>>print(keras.__name__, keras.__version__)
108-
keras2.0.8
109-
```
110-
111-
####mxnet
112-
```$ python```
113-
```python
11484
>>>import mxnet
115-
>>>print(mxnet.__name__, mxnet.__version__)
116-
mxnet0.11.0
117-
```
118-
119-
####cntk
120-
```$ python```
121-
```python
12285
>>>import cntk
123-
>>>print(cntk.__name__, cntk.__version__)
124-
cntk2.2
125-
```
126-
127-
####chainer
128-
```$ python```
129-
```python
13086
>>>import chainer
131-
>>>print(chainer.__name__, chainer.__version__)
132-
chainer3.0.0
133-
```
134-
135-
####theano
136-
```$ python```
137-
```python
13887
>>>import theano
139-
>>>print(theano.__name__, theano.__version__)
140-
theano0.10.0beta4+14.gb6e3768
141-
```
142-
143-
####lasagne
144-
```$ python```
145-
```python
14688
>>>import lasagne
147-
>>>print(lasagne.__name__, lasagne.__version__)
148-
lasagne0.2.dev1
149-
```
150-
151-
####caffe
152-
```$ python```
153-
```python
15489
>>>import caffe
155-
>>>print(caffe.__name__, caffe.__version__)
156-
caffe1.0.0
15790
```
15891

15992
```$ caffe --version```
16093
```
16194
caffe version 1.0.0
16295
```
16396

164-
####torch
16597
```$ th```
16698
```
16799
│ ______ __ | Torch7
@@ -173,9 +105,78 @@ caffe version 1.0.0
173105
│th>
174106
```
175107

108+
109+
<aname="Customization"/>
110+
111+
#Customization
112+
113+
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.
162+
163+
You can also specify the version of Python:
164+
```bash
165+
python generate.py Dockerfile pytorch lasagne python==3.6
166+
```
167+
168+
####Step 3. build your Dockerfile
169+
170+
```bash
171+
docker build -t my/deepo.
172+
```
173+
174+
This may take several minutes as it compiles a few libraries from scratch.
175+
176+
176177
<aname="Comparison"/>
177178

178-
##Comparison to alternatives
179+
#Comparison to alternatives
179180
. | modern-deep-learning | dl-docker | jupyter-deeplearning | Deepo
180181
:------------------------------------------------: | :------------------: | :----------------: | :------------------: | :----------------:
181182
[ubuntu](https://www.ubuntu.com) | 16.04 | 14.04 | 14.04 | 16.04
@@ -193,8 +194,15 @@ caffe version 1.0.0
193194
[caffe](http://caffe.berkeleyvision.org) |:heavy_check_mark: |:heavy_check_mark: |:heavy_check_mark: |:heavy_check_mark:
194195
[torch](http://torch.ch/) |:x: |:heavy_check_mark: |:heavy_check_mark: |:heavy_check_mark:
195196

197+
198+
<aname="Contributing"/>
199+
200+
#Contributing
201+
202+
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.
203+
196204
<aname="Licensing"/>
197205

198-
##Licensing
206+
#Licensing
199207

200208
Deepo is[MIT licensed](https://github.com/ufoym/deepo/blob/master/LICENSE).

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp