Public Repository

Last pushed: 2 years ago
Short Description
run keras with nvidia-docker (official support from nvidia)
Full Description

step:

Dockerfile
FROM nvidia/cuda:latest
MAINTAINER Helin Wang ustc.harry@gmail.com

Install git, python-dev, pip and other dependencies

RUN apt-get update && apt-get install -y \
git \
libopenblas-dev \
python-dev \
python-pip \
python-nose \
python-numpy \
python-scipy

Set CUDA_ROOT

ENV CUDA_ROOT /usr/local/cuda/bin

Install bleeding-edge Theano

RUN pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

Set up .theanorc for CUDA

RUN echo "[global]\ndevice=gpu\nfloatX=float32\n[nvcc]\nfastmath=True" > /root/.theanorc

Install dependencies

RUN apt-get update && apt-get install -y \
libhdf5-dev \
python-h5py \
python-yaml

Upgrade six

RUN pip install --upgrade six

Clone Keras repo and move into it

RUN cd /root && git clone https://github.com/fchollet/keras.git && cd keras && \

Install

python setup.py install

Set ~/keras as working directory

WORKDIR /root/keras

Docker Pull Command
Owner
helinwang

Comments (0)