Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Implement cuDNN, Caffe(dev), Digits(dev) Dockerfiles for CentOS 7 #55

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions centos-7/caffe/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM cuda:7.0-cudnn4-devel

ENV CAFFE_VERSION 0.14
LABEL com.nvidia.caffe.version="0.14"

# Install fpm and rpmrebuild
RUN yum install -y epel-release
RUN rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
RUN rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

# Install build essential
RUN yum update -y && yum install -y \
protobuf-devel leveldb-devel snappy-devel \
opencv-devel boost-devel hdf5-devel \
gflags-devel glog-devel lmdb-devel && \
rm -rf /var/cache/yum/*

RUN yum update -y && yum install -y \
wget git cmake make automake openblas-devel && \
rm -rf /var/cache/yum/*

# Get source code
ENV CAFFE_GIT https://github.com/NVIDIA/caffe.git
ENV CAFFE_TAG v0.14.2
ENV CAFFE_WS /tmp/caffe
RUN git clone --single-branch -b $CAFFE_TAG $CAFFE_GIT $CAFFE_WS

# Get Python dependencies
RUN yum update -y && yum install -y \
python-pip python-devel gcc-gfortran\
freetype-devel libpng-devel libjpeg-turbo-devel && \
rm -rf /var/cache/yum/*

RUN pip install --upgrade pip

# scipy

RUN cd $CAFFE_WS/python && for req in $(cat requirements.txt); do pip install $req; done

RUN mkdir -p $CAFFE_WS/build
RUN cd $CAFFE_WS/build && \
cmake ../ -DCUDNN_ROOT=/usr/lib/x86_64-linux-gnu -DBLAS=open
RUN cd $CAFFE_WS/build && \
make all && make install

3 changes: 3 additions & 0 deletions centos-7/caffe/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.

include ../../mk/caffe.mk
2 changes: 2 additions & 0 deletions centos-7/cuda/7.0/devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ RUN yum install -y \
cuda-misc-headers-$CUDA_PKG_VERSION \
cuda-command-line-tools-$CUDA_PKG_VERSION \
cuda-license-$CUDA_PKG_VERSION \
cuda-nvrtc-dev-$CUDA_PKG_VERSION \
cuda-cusolver-dev-$CUDA_PKG_VERSION \
cuda-cublas-dev-$CUDA_PKG_VERSION \
cuda-cufft-dev-$CUDA_PKG_VERSION \
cuda-curand-dev-$CUDA_PKG_VERSION \
Expand Down
14 changes: 14 additions & 0 deletions centos-7/cuda/7.0/devel/cudnn4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM cuda:7.0-devel

ENV CUDNN_VERSION 4
LABEL com.nvidia.cudnn.version="4"

ENV CUDNN_DOWNLOAD_SUM 4e64ef7716f20c87854b4421863328e17cce633330c319b5e13809b61a36f97d
ENV CUDNN_DOWNLOAD_FILENAME cudnn-7.0-linux-x64-v4.0-prod.tgz

RUN curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v4/$CUDNN_DOWNLOAD_FILENAME -O && \
echo "$CUDNN_DOWNLOAD_SUM $CUDNN_DOWNLOAD_FILENAME" | sha256sum -c --strict - && \
tar -xzf $CUDNN_DOWNLOAD_FILENAME -C /usr/local && \
rm $CUDNN_DOWNLOAD_FILENAME && \
ldconfig

13 changes: 13 additions & 0 deletions centos-7/cuda/7.0/runtime/cudnn4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM cuda:7.0-runtime

ENV CUDNN_VERSION 4
LABEL com.nvidia.cudnn.version="4"

ENV CUDNN_DOWNLOAD_SUM 4e64ef7716f20c87854b4421863328e17cce633330c319b5e13809b61a36f97d
ENV CUDNN_DOWNLOAD_FILENAME cudnn-7.0-linux-x64-v4.0-prod.tgz

RUN curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v4/$CUDNN_DOWNLOAD_FILENAME -O && \
echo "$CUDNN_DOWNLOAD_SUM $CUDNN_DOWNLOAD_FILENAME" | sha256sum -c --strict - && \
tar -xzf $CUDNN_DOWNLOAD_FILENAME --wildcards 'cuda/lib64/libcudnn.so*' -C /usr/local && \
rm $CUDNN_DOWNLOAD_FILENAME && \
ldconfig
2 changes: 2 additions & 0 deletions centos-7/cuda/7.5/devel/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ RUN yum install -y \
cuda-misc-headers-$CUDA_PKG_VERSION \
cuda-command-line-tools-$CUDA_PKG_VERSION \
cuda-license-$CUDA_PKG_VERSION \
cuda-nvrtc-dev-$CUDA_PKG_VERSION \
cuda-cusolver-dev-$CUDA_PKG_VERSION \
cuda-cublas-dev-$CUDA_PKG_VERSION \
cuda-cufft-dev-$CUDA_PKG_VERSION \
cuda-curand-dev-$CUDA_PKG_VERSION \
Expand Down
13 changes: 13 additions & 0 deletions centos-7/cuda/7.5/devel/cudnn4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM cuda:7.5-devel

ENV CUDNN_VERSION 4
LABEL com.nvidia.cudnn.version="4"

ENV CUDNN_DOWNLOAD_SUM 4e64ef7716f20c87854b4421863328e17cce633330c319b5e13809b61a36f97d
ENV CUDNN_DOWNLOAD_FILENAME cudnn-7.0-linux-x64-v4.0-prod.tgz

RUN curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v4/$CUDNN_DOWNLOAD_FILENAME -O && \
echo "$CUDNN_DOWNLOAD_SUM $CUDNN_DOWNLOAD_FILENAME" | sha256sum -c --strict - && \
tar -xzf $CUDNN_DOWNLOAD_FILENAME -C /usr/local && \
rm $CUDNN_DOWNLOAD_FILENAME && \
ldconfig
13 changes: 13 additions & 0 deletions centos-7/cuda/7.5/runtime/cudnn4/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM cuda:7.5-runtime

ENV CUDNN_VERSION 4
LABEL com.nvidia.cudnn.version="4"

ENV CUDNN_DOWNLOAD_SUM 4e64ef7716f20c87854b4421863328e17cce633330c319b5e13809b61a36f97d
ENV CUDNN_DOWNLOAD_FILENAME cudnn-7.0-linux-x64-v4.0-prod.tgz

RUN curl -fsSL http://developer.download.nvidia.com/compute/redist/cudnn/v4/$CUDNN_DOWNLOAD_FILENAME -O && \
echo "$CUDNN_DOWNLOAD_SUM $CUDNN_DOWNLOAD_FILENAME" | sha256sum -c --strict - && \
tar -xzf $CUDNN_DOWNLOAD_FILENAME --wildcards 'cuda/lib64/libcudnn.so*' -C /usr/local && \
rm $CUDNN_DOWNLOAD_FILENAME && \
ldconfig
3 changes: 2 additions & 1 deletion centos-7/cuda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
CUDA_VERSIONS := 7.5 \
7.0

all-override: all-cuda
CUDNN_VERSIONS := 7.5-cudnn4 \
7.0-cudnn4

include ../../mk/cuda.mk
33 changes: 33 additions & 0 deletions centos-7/digits/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM caffe

ENV DIGITS_VERSION 3.0
LABEL com.nvidia.digits.version="3.0"

# Install build essential
RUN yum update -y && yum install -y \
graphviz

# Get source code
ENV DIGITS_GIT https://github.com/NVIDIA/DIGITS.git
ENV DIGITS_TAG v3.0.0-rc.1
ENV DIGITS_WS /tmp/digits
RUN git clone --single-branch -b $DIGITS_TAG $DIGITS_GIT $DIGITS_WS

# Setup python packages
RUN cd $DIGITS_WS && \
pip install -r requirements.txt

# Fix issue of dependencies
RUN pip install Flask-SocketIO==0.6.0
# Fix issue of dependencies
RUN pip install Flask-SocketIO==0.6.0

RUN mkdir -p /var/log/digits
RUN mkdir -p /usr/share/digits/digits/jobs

RUN echo -e "[DIGITS]\ncaffe_root = /tmp/caffe\n" > $DIGITS_WS/digits/digits.cfg
WORKDIR $DIGITS_WS

# EXPOSE 34448
# ENTRYPOINT ["./digits-devserver"]

3 changes: 3 additions & 0 deletions centos-7/digits/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.

include ../../mk/digits.mk