summaryrefslogtreecommitdiff
path: root/docker/cpu
diff options
context:
space:
mode:
authorCyprien Noel <cyprien.noel@gmail.com>2017-01-17 20:10:15 -0800
committerCyprien Noel <cyprien.noel@gmail.com>2017-01-19 18:44:47 -0800
commit4056f79f9d8ebf261db45883470a0e2939f725e9 (patch)
treea7bf18716c329591ee2336a93995927967da12b3 /docker/cpu
parent8065c1898a4461d8ef4bac2dbf1ac2a2c78e28c0 (diff)
downloadcaffeonacl-4056f79f9d8ebf261db45883470a0e2939f725e9.tar.gz
caffeonacl-4056f79f9d8ebf261db45883470a0e2939f725e9.tar.bz2
caffeonacl-4056f79f9d8ebf261db45883470a0e2939f725e9.zip
Docker refresh: simplified & update to 16.04, cuda8, cudnn5, nccl
Diffstat (limited to 'docker/cpu')
-rw-r--r--docker/cpu/Dockerfile45
1 files changed, 45 insertions, 0 deletions
diff --git a/docker/cpu/Dockerfile b/docker/cpu/Dockerfile
new file mode 100644
index 00000000..af6c03c6
--- /dev/null
+++ b/docker/cpu/Dockerfile
@@ -0,0 +1,45 @@
+FROM ubuntu:16.04
+LABEL maintainer caffe-maint@googlegroups.com
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ build-essential \
+ cmake \
+ git \
+ wget \
+ libatlas-base-dev \
+ libboost-all-dev \
+ libgflags-dev \
+ libgoogle-glog-dev \
+ libhdf5-serial-dev \
+ libleveldb-dev \
+ liblmdb-dev \
+ libopencv-dev \
+ libprotobuf-dev \
+ libsnappy-dev \
+ protobuf-compiler \
+ python-dev \
+ python-numpy \
+ python-pip \
+ python-setuptools \
+ python-scipy && \
+ rm -rf /var/lib/apt/lists/*
+
+ENV CAFFE_ROOT=/opt/caffe
+WORKDIR $CAFFE_ROOT
+
+# FIXME: use ARG instead of ENV once DockerHub supports this
+ENV CLONE_TAG=rc4
+
+RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/BVLC/caffe.git . && \
+ pip install --upgrade pip && \
+ cd python && for req in $(cat requirements.txt) pydot; do pip install $req; done && cd .. && \
+ mkdir build && cd build && \
+ cmake -DCPU_ONLY=1 .. && \
+ make -j"$(nproc)"
+
+ENV PYCAFFE_ROOT $CAFFE_ROOT/python
+ENV PYTHONPATH $PYCAFFE_ROOT:$PYTHONPATH
+ENV PATH $CAFFE_ROOT/build/tools:$PYCAFFE_ROOT:$PATH
+RUN echo "$CAFFE_ROOT/build/lib" >> /etc/ld.so.conf.d/caffe.conf && ldconfig
+
+WORKDIR /workspace