Dockerfile.gpu 1.3 KB
Newer Older
1
FROM nvidia/cuda:9.0-cudnn7-devel-centos7 as builder
M
MRXLT 已提交
2

3
FROM nvidia/cuda:9.0-cudnn7-runtime-centos7
4 5
RUN yum -y install wget && \
    yum -y install epel-release && yum -y install patchelf && \
B
barrierye 已提交
6
    yum -y install gcc gcc-c++ make python-devel && \
7 8 9
    yum -y install libSM-1.2.2-2.el7.x86_64 --setopt=protected_multilib=false && \
    yum -y install libXrender-0.9.10-1.el7.x86_64 --setopt=protected_multilib=false && \
    yum -y install libXext-1.3.3-3.el7.x86_64 --setopt=protected_multilib=false && \
B
barrierye 已提交
10
    yum -y install python3 python3-devel && \
G
gongweibao 已提交
11 12 13 14 15 16
    yum clean all

RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
    python get-pip.py && rm get-pip.py

RUN ln -s /usr/local/cuda-9.0/lib64/libcublas.so.9.0 /usr/local/cuda-9.0/lib64/libcublas.so && \
Y
Your Name 已提交
17
    echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> /root/.bashrc && \
18
    ln -s /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so.7 /usr/local/cuda-9.0/targets/x86_64-linux/lib/libcudnn.so && \
19
    echo 'export LD_LIBRARY_PATH=/usr/local/cuda-9.0/targets/x86_64-linux/lib:$LD_LIBRARY_PATH' >> /root/.bashrc && \
20
    echo "export LANG=en_US.utf8" >> /root/.bashrc && \
21 22
    mkdir -p /usr/local/cuda/extras

23
COPY --from=builder /usr/local/cuda/extras/CUPTI /usr/local/cuda/extras/CUPTI