forked from intel/caffe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Dockerfile for gpu
- Loading branch information
Showing
1 changed file
with
46 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,46 @@ | ||
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 | ||
MAINTAINER [email protected] | ||
|
||
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-scipy && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CAFFE_ROOT=/opt/caffe | ||
WORKDIR $CAFFE_ROOT | ||
|
||
# FIXME: clone a specific git tag and use ARG instead of ENV once DockerHub supports this. | ||
ENV CLONE_TAG=master | ||
|
||
RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/intel/caffe.git . && \ | ||
for req in $(cat python/requirements.txt) pydot; do pip install $req; done && \ | ||
mkdir build && cd build && \ | ||
cmake -DUSE_CUDNN=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 | ||
FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04 | ||
MAINTAINER [email protected] | ||
|
||
#ENV http_proxy proxy:port | ||
#ENV https_proxy proxy:port | ||
|
||
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-scipy && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
ENV CAFFE_ROOT=/opt/caffe | ||
WORKDIR $CAFFE_ROOT | ||
|
||
# FIXME: clone a specific git tag and use ARG instead of ENV once DockerHub supports this. | ||
ENV CLONE_TAG=master | ||
|
||
RUN git clone -b ${CLONE_TAG} --depth 1 https://github.com/intel/caffe.git . && \ | ||
for req in $(cat python/requirements.txt) pydot; do pip install $req; done && \ | ||
mkdir build && cd build && \ | ||
cmake -DUSE_CUDNN=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 |