Coder Social home page Coder Social logo

docker-keras's Introduction

docker-keras

docker-keras is a minimal Docker image built from Debian 9 (amd64) for reproducible deep learning based on Keras. It features minimal images for Python 2 or 3, TensorFlow, Theano, or CNTK backends, processing on CPU or GPU, and uses only Debian and Python packages (no manual installations). Each tag is using the latest released versions at a specific date.

Open source project:

Available tags:

  • 2.1.4-py2, 2.1.4-cpu, 2.1.4, latest points to 2.1.4-py2-tf-cpu
  • 2.1.4-py3 points to 2.1.4-py3-tf-cpu
  • 2.1.4-gpu points to 2.1.4-py2-tf-gpu
  • 2.1.4-py2-tf-cpu/2.1.4-py2-tf-gpu/2.1.4-py3-tf-cpu/2.1.4-py3-tf-gpu [2018-02-15]: Python 2.7/3.5 + Keras (2.1.4) + TensorFlow (1.5.0) on CPU/GPU (Dockerfile.py2-tf-cpu/.py2-tf-gpu/.py3-tf-cpu/.py3-tf-gpu)
  • 2.1.4-py2-th-cpu/2.1.4-py2-th-gpu/2.1.4-py3-th-cpu/2.1.4-py3-th-gpu [2018-02-15]: Python 2.7/3.5 + Keras (2.1.4) + Theano (1.0.1) on CPU/GPU (Dockerfile.py2-th-cpu*/.py2-th-gpu.py3-th-cpu/.py3-th-gpu)
  • 2.1.4-py2-cntk-cpu/2.1.4-py2-cntk-gpu/2.1.4-py3-cntk-cpu/2.1.4-py3-cntk-gpu [2018-02-15]: Python 2.7/3.5 + Keras (2.1.4) + CNTK (2.4) on CPU/GPU (Dockerfile.py2-cntk-cpu*/.py2-cntk-gpu.py3-cntk-cpu/.py3-cntk-gpu)
  • 2.1.3-py2-tf-cpu/2.1.3-py2-tf-gpu/2.1.3-py3-tf-cpu/2.1.3-py3-tf-gpu [2018-01-17]: Python 2.7/3.5 + Keras (2.1.3) + TensorFlow (1.4.1) on CPU/GPU (Dockerfile.py2-tf-cpu/.py2-tf-gpu/.py3-tf-cpu/.py3-tf-gpu)
  • 2.1.3-py2-th-cpu/2.1.3-py2-th-gpu/2.1.3-py3-th-cpu/2.1.3-py3-th-gpu [2018-01-17]: Python 2.7/3.5 + Keras (2.1.3) + Theano (1.0.1) on CPU/GPU (Dockerfile.py2-th-cpu*/.py2-th-gpu.py3-th-cpu/.py3-th-gpu)
  • 2.1.3-py2-cntk-cpu/2.1.3-py2-cntk-gpu/2.1.3-py3-cntk-cpu/2.1.3-py3-cntk-gpu [2018-01-17]: Python 2.7/3.5 + Keras (2.1.3) + CNTK (2.3) on CPU/GPU (Dockerfile.py2-cntk-cpu*/.py2-cntk-gpu.py3-cntk-cpu/.py3-cntk-gpu)
  • 2.1.1-py2-tf-cpu/2.1.1-py2-tf-gpu/2.1.1-py3-tf-cpu/2.1.1-py3-tf-gpu [2017-12-01]: Python 2.7/3.5 + Keras (2.1.1) + TensorFlow (1.4.0) on CPU/GPU
  • 2.1.1-py2-th-cpu/2.1.1-py2-th-gpu/2.1.1-py3-th-cpu/2.1.1-py3-th-gpu [2017-12-01]: Python 2.7/3.5 + Keras (2.1.1) + Theano (1.0.0) on CPU/GPU
  • 2.1.1-py2-cntk-cpu/2.1.1-py2-cntk-gpu/2.1.1-py3-cntk-cpu/2.1.1-py3-cntk-gpu [2017-12-01]: Python 2.7/3.5 + Keras (2.1.1) + CNTK (2.3) on CPU/GPU
  • 2.0.8-py2-tf-cpu/2.0.8-py2-tf-gpu/2.0.8-py3-tf-cpu/2.0.8-py3-tf-gpu [2017-09-14]: Python 2.7/3.5 + Keras (2.0.8) + TensorFlow (1.3.0) on CPU/GPU
  • 2.0.8-py2-th-cpu/2.0.8-py2-th-gpu/2.0.8-py3-th-cpu/2.0.8-py3-th-gpu [2017-09-14]: Python 2.7/3.5 + Keras (2.0.8) + Theano (0.9.0) on CPU/GPU
  • 2.0.8-py2-cntk-cpu/2.0.8-py2-cntk-gpu/2.0.8-py3-cntk-cpu/2.0.8-py3-cntk-gpu [2017-09-14]: Python 2.7/3.5 + Keras (2.0.8) + CNTK (2.1) on CPU/GPU
  • 2.0.6-py2-tf-cpu/2.0.6-py2-tf-gpu/2.0.6-py3-tf-cpu/2.0.6-py3-tf-gpu [2017-07-13]: Python 2.7/3.5 + Keras (2.0.6) + TensorFlow (1.2.1) on CPU/GPU
  • 2.0.6-py2-th-cpu/2.0.6-py2-th-gpu/2.0.6-py3-th-cpu/2.0.6-py3-th-gpu [2017-07-13]: Python 2.7/3.5 + Keras (2.0.6) + Theano (0.9.0) on CPU/GPU
  • 2.0.5-py2-tf-cpu/2.0.5-py2-tf-gpu/2.0.5-py3-tf-cpu/2.0.5-py3-tf-gpu [2017-06-13]: Python 2.7/3.5 + Keras (2.0.5) + TensorFlow (1.1.0) on CPU/GPU
  • 2.0.5-py2-th-cpu/2.0.5-py2-th-gpu/2.0.5-py3-th-cpu/2.0.5-py3-th-gpu [2017-06-13]: Python 2.7/3.5 + Keras (2.0.5) + Theano (0.9.0) on CPU/GPU
  • 2.0.4-py2-tf-cpu/2.0.4-py2-tf-gpu/2.0.4-py3-tf-cpu/2.0.4-py3-tf-gpu [2017-05-01]: Python 2.7/3.5 + Keras (2.0.4) + TensorFlow (1.1.0) on CPU/GPU
  • 2.0.4-py2-th-cpu/2.0.4-py2-th-gpu/2.0.4-py3-th-cpu/2.0.4-py3-th-gpu [2017-05-01]: Python 2.7/3.5 + Keras (2.0.4) + Theano (0.9.0) on CPU/GPU
  • 2.0.3-py2-tf-cpu/2.0.3-py2-tf-gpu/2.0.3-py3-tf-cpu/2.0.3-py3-tf-gpu [2017-04-19]: Python 2.7/3.5 + Keras (2.0.3) + TensorFlow (1.0.1) on CPU/GPU
  • 2.0.3-py2-th-cpu/2.0.3-py2-th-gpu/2.0.3-py3-th-cpu/2.0.3-py3-th-gpu [2017-04-19]: Python 2.7/3.5 + Keras (2.0.3) + Theano (0.9.0) on CPU/GPU
  • 2.0.2-py2-tf-cpu/2.0.2-py2-tf-gpu/2.0.2-py3-tf-cpu/2.0.2-py3-tf-gpu [2017-03-27]: Python 2.7/3.5 + Keras (2.0.2) + TensorFlow (1.0.1) on CPU/GPU
  • 2.0.2-py2-th-cpu/2.0.2-py2-th-gpu/2.0.2-py3-th-cpu/2.0.2-py3-th-gpu [2017-03-27]: Python 2.7/3.5 + Keras (2.0.2) + Theano (0.9.0) on CPU/GPU
  • 2.0.0-py2-tf-cpu/2.0.0-py2-tf-gpu/2.0.0-py3-tf-cpu/2.0.0-py3-tf-gpu [2017-03-15]: Python 2.7/3.5 + Keras (2.0.0) + TensorFlow (1.0.1) on CPU/GPU
  • 2.0.0-py2-th-cpu/2.0.0-py2-th-gpu/2.0.0-py3-th-cpu/2.0.0-py3-th-gpu [2017-03-15]: Python 2.7/3.5 + Keras (2.0.0) + Theano (0.8.2) on CPU/GPU
  • 1.2.2-py2-tf-cpu/1.2.2-py2-tf-gpu/1.2.2-py3-tf-cpu/1.2.2-py3-tf-gpu [2017-02-17]: Python 2.7/3.5 + Keras (1.2.2) + TensorFlow (1.0.0) on CPU/GPU
  • 1.2.2-py2-th-cpu/1.2.2-py2-th-gpu/1.2.2-py3-th-cpu/1.2.2-py3-th-gpu [2017-02-17]: Python 2.7/3.5 + Keras (1.2.2) + Theano (0.8.2) on CPU/GPU
  • 1.2.1-py2-tf-cpu/1.2.1-py2-tf-gpu/1.2.1-py3-tf-cpu/1.2.1-py3-tf-gpu [2017-01-20]: Python 2.7/3.5 + Keras (1.2.1) + TensorFlow (0.12.1) on CPU/GPU
  • 1.2.1-py2-th-cpu/1.2.1-py2-th-gpu/1.2.1-py3-th-cpu/1.2.1-py3-th-gpu [2017-01-20]: Python 2.7/3.5 + Keras (1.2.1) + Theano (0.8.2) on CPU/GPU
  • 1.2.0-py2-tf-cpu/1.2.0-py2-tf-gpu/1.2.0-py3-tf-cpu/1.2.0-py3-tf-gpu [2016-12-20]: Python 2.7/3.5 + Keras (1.2.0) + TensorFlow (0.12.0) on CPU/GPU
  • 1.2.0-py2-th-cpu/1.2.0-py2-th-gpu/1.2.0-py3-th-cpu/1.2.0-py3-th-gpu [2016-12-20]: Python 2.7/3.5 + Keras (1.2.0) + Theano (0.8.2) on CPU/GPU
  • 1.1.1-py2-tf-cpu/1.1.1-py2-tf-gpu/1.1.1-py3-tf-cpu/1.1.1-py3-tf-gpu [2016-10-31]: Python 2.7/3.5 + Keras (1.1.1) + TensorFlow (0.10.0) on CPU/GPU
  • 1.1.1-py2-th-cpu/1.1.1-py2-th-gpu/1.1.1-py3-th-cpu/1.1.1-py3-th-gpu [2016-10-31]: Python 2.7/3.5 + Keras (1.1.1) + Theano (0.8.2) on CPU/GPU
  • 1.1.0-py2-tf-cpu/1.1.0-py2-tf-gpu/1.1.0-py3-tf-cpu/1.1.0-py3-tf-gpu [2016-09-20]: Python 2.7/3.5 + Keras (1.1.0) + TensorFlow (0.10.0) on CPU/GPU
  • 1.1.0-py2-th-cpu/1.1.0-py2-th-gpu/1.1.0-py3-th-cpu/1.1.0-py3-th-gpu [2016-09-20]: Python 2.7/3.5 + Keras (1.1.0) + Theano (0.8.2) on CPU/GPU
  • 1.0.8-py2-tf-cpu/1.0.8-py2-tf-gpu/1.0.8-py3-tf-cpu/1.0.8-py3-tf-gpu [2016-08-28]: Python 2.7/3.5 + Keras (1.0.8) + TensorFlow (0.9.0) on CPU/GPU
  • 1.0.8-py2-th-cpu/1.0.8-py2-th-gpu/1.0.8-py3-th-cpu/1.0.8-py3-th-gpu [2016-08-28]: Python 2.7/3.5 + Keras (1.0.8) + Theano (0.8.2) on CPU/GPU
  • 1.0.6-py2-tf-cpu/1.0.6-py2-tf-gpu/1.0.6-py3-tf-cpu/1.0.6-py3-tf-gpu [2016-07-20]: Python 2.7/3.5 + Keras (1.0.6) + TensorFlow (0.9.0) on CPU/GPU
  • 1.0.6-py2-th-cpu/1.0.6-py2-th-gpu/1.0.6-py3-th-cpu/1.0.6-py3-th-gpu [2016-07-20]: Python 2.7/3.5 + Keras (1.0.6) + Theano (0.8.2) on CPU/GPU
  • 1.0.4-py2-tf-cpu/1.0.4-py2-tf-gpu/1.0.4-py3-tf-cpu/1.0.4-py3-tf-gpu [2016-06-16]: Python 2.7/3.5 + Keras (1.0.4) + TensorFlow (0.8.0) on CPU/GPU
  • 1.0.4-py2-th-cpu/1.0.4-py2-th-gpu/1.0.4-py3-th-cpu/1.0.4-py3-th-gpu [2016-06-16]: Python 2.7/3.5 + Keras (1.0.4) + Theano (0.8.2) on CPU/GPU
  • 1.0.1-py2-th-cpu/1.0.1-py2-th-gpu [2016-04-16]: Python 2.7 + Keras (1.0.1) + Theano (0.8.1) on CPU/GPU
  • 0.3.3-py2-th-cpu/0.3.3-py2-th-gpu [2016-03-31]: Python 2.7 + Keras (0.3.3) + Theano (0.8.1) on CPU/GPU

Usage

Quick experiment with latest Keras (with TensorFlow backend on CPU) and your Python 2 code in current directory (will be mapped to /srv):

$ docker run -it --rm -v $(pwd):/srv gw000/keras /srv/run.py

Or using TensorFlow backend on GPUs in Python 2 (see docker-debian-cuda):

$ docker run -it --rm $(ls /dev/nvidia* | xargs -I{} echo '--device={}') $(ls /usr/lib/*-linux-gnu/{libcuda,libnvidia}* | xargs -I{} echo '-v {}:{}:ro') -v $(pwd):/srv gw000/keras:2.1.4-py2-tf-gpu /srv/run.py

Or using Theano backend on GPUs in Python 3 (see docker-debian-cuda):

$ docker run -it --rm $(ls /dev/nvidia* | xargs -I{} echo '--device={}') $(ls /usr/lib/*-linux-gnu/{libcuda,libnvidia}* | xargs -I{} echo '-v {}:{}:ro') -v $(pwd):/srv gw000/keras:2.1.4-py3-th-gpu /srv/run.py

Additional parameters in above commands explicitly expose your GPU devices and CUDA Driver library from the host system into the container. The vendor specific nvidia-docker tool performs the same thing in a less transparent way and is incompatible with other Docker tools. For more instructions see docker-debian-cuda.

In practice you are supposed to extend this image by writing your own Dockerfile that installs all your application dependencies (either using apt-get or pip). Eg. if you need Matplotlib, PIL/pillow, Pandas, Scikit-learn, and Statsmodels:

FROM gw000/keras:2.1.4-py3-tf-cpu

# install dependencies from debian packages
RUN apt-get update -qq \
 && apt-get install --no-install-recommends -y \
    python-matplotlib \
    python-pillow

# install dependencies from python packages
RUN pip --no-cache-dir install \
    pandas \
    scikit-learn \
    statsmodels

# install your app
ADD ai/ /srv/ai/
RUN chmod +x /srv/ai/run.py

# default command
CMD ["/srv/ai/run.py"]

If you are looking for a full deep learning research environment based on Keras and Jupyter, check out docker-keras-full.

Feedback

If you encounter any bugs or have feature requests, please file them in the issue tracker or even develop it yourself and submit a pull request over GitHub.

License

Copyright © 2016-2018 gw0 [http://gw.tnode.com/] <[email protected]>

All code is licensed under the GNU Affero General Public License 3.0+ (AGPL-3.0+). Note that it is mandatory to make all modifications and complete source code publicly available to any user.

docker-keras's People

Contributors

gw0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-keras's Issues

Index files failed to download on keras:2.1.4_tf_gpu

Hi, I am trying to add some extra libraries on top of your keras:2.1.4_tf_gpu image. However, when I try to start building your dockerfile I get the following error:

W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update -qq  && apt-get install --no-install-recommends -y     build-essential     vim     g++     git     openssh-client     python3     python3-dev     python3-pip     python3-setuptools     python3-virtualenv     python3-wheel     pkg-config     libopenblas-base     python3-numpy     python3-scipy     python3-h5py     python3-yaml     python3-pydot  && apt-get clean  && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

How do I fix this?

Not working

This docker image not supporting Volta architecture. Can you add CUDA 9?
I have Tesla V100-SXM2-16GB GPU and got the following error trying to use it inside the container

2018-01-18 15:59:34.504171: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:152] no NVIDIA GPU device is present: /dev/nvidia0 does not exist

Missing SSH package

Could you add the open ssh package within this containers so we can connect with git over SSH ?

apt-get update && apt-get install openssh-client

Not able to access the Juypter notebook from Host

Hello,
I am not able to access the Juypter note book from host, I am trying "localhost:8888", getting below error on container dos prompt:
No web browser found: could not locate runnable browser.

Can't find `nvidia-smi` in 2.1.4-py3-tf-gpu

$ docker run --runtime=nvidia -it --rm gw000/keras:2.1.4-py3-tf-gpu nvidia-smi 
docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"nvidia-smi\": executable file not found in $PATH": unknown.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.