Skip to content

Commit 5222b58

Browse files
committed
support UBUNTU MIRROR and modify doc
1 parent 0df8b63 commit 5222b58

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

doc/getstarted/build_and_install/docker_install_en.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,22 @@ to install CUDA driver and let Docker knows about it:
142142
export DEVICES=$(\ls /dev/nvidia* | xargs -I{} echo '--device {}:{}')
143143
docker run ${CUDA_SO} ${DEVICES} -it paddledev/paddle:gpu-latest
144144
145+
146+
UBUNTU MIRROR
147+
-------------
148+
149+
Building Paddle Docker image hits some wrong with apt-get update, you
150+
can use other UBUNTU MIRROR instead of the default
151+
152+
.. code-block:: bash
153+
154+
cd ~
155+
git clone https://github.com/PaddlePaddle/Paddle.git
156+
cd Paddle
157+
git submodule update --init --recursive
158+
docker build --build-arg UBUNTU_MIRROR="http://mirrors.163.com" -t paddle:cpu-avx -f paddle/scripts/docker/Dockerfile .
159+
docker build --build-arg UBUNTU_MIRROR="http://mirrors.163.com" -t paddle:gpu-avx -f paddle/scripts/docker/Dockerfile.gpu .
160+
145161
146162
Non-AVX Images
147163
--------------

paddle/scripts/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM ubuntu:14.04
22
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
33

44
ARG DEBIAN_FRONTEND=noninteractive
5+
ARG UBUNTU_MIRROR
6+
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
57
RUN apt-get update \
68
&& apt-get install -y cmake libprotobuf-dev protobuf-compiler git \
79
libgoogle-glog-dev libgflags-dev libgtest-dev \

paddle/scripts/docker/Dockerfile.gpu

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM nvidia/cuda:7.5-cudnn5-devel-ubuntu14.04
22
MAINTAINER PaddlePaddle Authors <paddle-dev@baidu.com>
33

44
ARG DEBIAN_FRONTEND=noninteractive
5+
ARG UBUNTU_MIRROR
6+
RUN /bin/bash -c 'if [[ -n ${UBUNTU_MIRROR} ]]; then sed -i 's#http://archive.ubuntu.com#${UBUNTU_MIRROR}#g' /etc/apt/sources.list; fi'
57
RUN apt-get update \
68
&& apt-get install -y cmake libprotobuf-dev protobuf-compiler git \
79
libgoogle-glog-dev libgflags-dev libgtest-dev \

0 commit comments

Comments
 (0)