Dockerfile 1.6 KB
Newer Older
W
Wu Yi 已提交
1
FROM nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
2 3 4 5 6

# Use UBUNTU_MIRROR can speed up apt-get speed.
# ARG UBUNTU_MIRROR
# RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com/ubuntu#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'

7
RUN apt-get update && apt-get install -y python python-pip iputils-ping libgtk2.0-dev wget vim net-tools iftop python-opencv
W
Wu Yi 已提交
8 9 10 11
RUN ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.7 /usr/lib/libcudnn.so && ln -s /usr/lib/x86_64-linux-gnu/libnccl.so.2 /usr/lib/libnccl.so

# IMPORTANT:
# Add "ENV http_proxy=http://ip:port" if your download is slow, and don't forget to unset it at runtime.
12 13 14 15
# exmaple: unset http_proxy && unset https_proxy && python fluid_benchmark.py ...

RUN pip install -U pip
RUN pip install -U kubernetes paddlepaddle
W
Wu Yi 已提交
16 17 18 19 20 21 22 23

RUN sh -c 'echo "import paddle.v2 as paddle\npaddle.dataset.cifar.train10()\npaddle.dataset.flowers.fetch()" | python'
RUN sh -c 'echo "import paddle.v2 as paddle\npaddle.dataset.mnist.train()\npaddle.dataset.mnist.test()\npaddle.dataset.imdb.fetch()" | python'
RUN sh -c 'echo "import paddle.v2 as paddle\npaddle.dataset.imikolov.fetch()" | python'
RUN pip uninstall -y paddlepaddle && mkdir /workspace

ADD https://raw.githubusercontent.com/PaddlePaddle/cloud/develop/docker/paddle_k8s /usr/bin
ADD https://raw.githubusercontent.com/PaddlePaddle/cloud/develop/docker/k8s_tools.py /root
24
RUN chmod +x /usr/bin/paddle_k8s
W
Wu Yi 已提交
25 26

ADD *.whl /
27
RUN pip install /*.whl && rm -f /*.whl 
W
Wu Yi 已提交
28 29

ENV LD_LIBRARY_PATH=/usr/local/lib
30 31
ADD fluid_benchmark.py recordio_converter.py args.py recordio_converter.py run.sh run_fluid_benchmark.sh /workspace/
ADD models/ /workspace/models/