Permalink
Browse files

Add CUDA 7.5 and 8.0 Dockerfiles (#4114)

* Add CUDA 7.5 and 8.0 Dockerfiles

* Use ~/mxnet as the workdir, set PYTHONPATH in dockerfile
  • Loading branch information...
1 parent 092ff44 commit 3f6cc9d8f2f0f212d6c791000ca078a2823a3dd2 @pineking pineking committed with piiswrong Dec 7, 2016
Showing with 50 additions and 17 deletions.
  1. +25 −0 docker/cuda/7.5/Dockerfile
  2. +25 −0 docker/cuda/8.0/Dockerfile
  3. +0 −17 docker/cuda/Dockerfile
@@ -0,0 +1,25 @@
+FROM nvidia/cuda:7.5-cudnn5-devel
+MAINTAINER Qingsong Liu <liuqs.ustc@gmail.com>
+
+RUN apt-get update && apt-get install -y \
+ git \
+ libopenblas-dev \
+ libopencv-dev \
+ python-dev \
+ python-numpy \
+ python-setuptools \
+ wget \
+ python-pip \
+ unzip
+
+RUN cd /root && git clone --recursive https://github.com/dmlc/mxnet && cd mxnet && \
+ cp make/config.mk . && \
+ sed -i 's/USE_BLAS = atlas/USE_BLAS = openblas/g' config.mk && \
+ sed -i 's/USE_CUDA = 0/USE_CUDA = 1/g' config.mk && \
+ sed -i 's/USE_CUDA_PATH = NONE/USE_CUDA_PATH = \/usr\/local\/cuda/g' config.mk && \
+ sed -i 's/USE_CUDNN = 0/USE_CUDNN = 1/g' config.mk && \
+ make -j"$(nproc)"
+
+ENV PYTHONPATH /root/mxnet/python
+
+WORKDIR /root/mxnet
@@ -0,0 +1,25 @@
+FROM nvidia/cuda:8.0-cudnn5-devel
+MAINTAINER Qingsong Liu <liuqs.ustc@gmail.com>
+
+RUN apt-get update && apt-get install -y \
+ git \
+ libopenblas-dev \
+ libopencv-dev \
+ python-dev \
+ python-numpy \
+ python-setuptools \
+ wget \
+ python-pip \
+ unzip
+
+RUN cd /root && git clone --recursive https://github.com/dmlc/mxnet && cd mxnet && \
+ cp make/config.mk . && \
+ sed -i 's/USE_BLAS = atlas/USE_BLAS = openblas/g' config.mk && \
+ sed -i 's/USE_CUDA = 0/USE_CUDA = 1/g' config.mk && \
+ sed -i 's/USE_CUDA_PATH = NONE/USE_CUDA_PATH = \/usr\/local\/cuda/g' config.mk && \
+ sed -i 's/USE_CUDNN = 0/USE_CUDNN = 1/g' config.mk && \
+ make -j"$(nproc)"
+
+ENV PYTHONPATH /root/mxnet/python
+
+WORKDIR /root/mxnet
@@ -1,17 +0,0 @@
-FROM nvidia/cuda:7.5-cudnn4-devel
-MAINTAINER Mu Li <muli@cs.cmu.edu>
-
-# install the core library
-RUN apt-get update && apt-get install -y build-essential git libopenblas-dev libopencv-dev
-RUN git clone --recursive https://github.com/dmlc/mxnet/ && cd mxnet && \
- cp make/config.mk . && \
- echo "USE_CUDA=1" >>config.mk && \
- echo "USE_CUDA_PATH=/usr/local/cuda" >>config.mk && \
- echo "USE_CUDNN=1" >>config.mk && \
- echo "USE_BLAS=openblas" >>config.mk && \
- make -j$(nproc) ADD_LDFLAGS=-L/usr/local/cuda/lib64/stubs
-ENV LD_LIBRARY_PATH /usr/local/cuda/lib64:$LD_LIBRARY_PATH
-
-# python pakcage
-RUN apt-get install -y python-numpy wget unzip
-ENV PYTHONPATH /mxnet/python

0 comments on commit 3f6cc9d

Please sign in to comment.