FROM allansp84/ubuntu16.04-cuda8.0-opencv3.2
ENV PYTHONPATH /opt/caffe/python
# Add caffe binaries to path
ENV PATH $PATH:/opt/caffe/.build_release/tools
# Get dependencies
RUN apt-get update && apt-get install -y \
automake \
autoconf \
autotools-dev \
bc \
cmake \
curl \
gcc-5 \
g++-5 \
gcc-5-multilib \
gfortran \
git \
libprotobuf-dev \
libleveldb-dev \
libsnappy-dev \
libopencv-dev \
libboost-all-dev \
libhdf5-serial-dev \
liblmdb-dev \
libjpeg62 \
libfreeimage-dev \
libatlas-base-dev \
pkgconf \
protobuf-compiler \
python-dev \
python-pip \
python-yaml \
python-numpy \
unzip \
wget
# Allow it to find CUDA libs
RUN echo
"/usr/local/cuda/lib64" > /etc/ld.so.conf.d/cuda.conf && \
ldconfig
# Clone the Caffe repo
# RUN cd /opt && git clone https://github.com/BVLC/caffe.git
# RUN cd /opt && git clone https://nadavpixoneye@bitbucket.org/pixoneye/caffe.git
RUN cd /opt && git clone https://github.com/alexgkendall/caffe-segnet.git
# Glog
RUN cd /opt && wget https://github.com/google/glog/archive/master.zip && \
mv master.zip glog.zip && \
unzip glog.zip && \
cd /opt/glog-master && \
./autogen && \
./configure && \
make && \
make install
RUN ldconfig
# Gflags
RUN cd /opt && \
wget https://github.com/schuhschuh/gflags/archive/master.zip && \
mv master.zip gflags.zip && \
unzip gflags.zip && \
cd /opt/gflags-master && \
mkdir build && \
cd /opt/gflags-master/build && \
export CXXFLAGS=
"-fPIC" && \
cmake .. && \
make VERBOSE=1 && \
make && \
make install
# Build Caffe core
RUN cd /opt/caffe-segnet && \
mkdir build && \
cd build && \
cmake .. && \
make -j8