Skip to content

Commit 392dc96

Browse files
authored
Merge pull request PaddlePaddle#761 from PaddlePaddle/install-bazel
Add bazel installation to the Dockerfiles
2 parents 0cdfa8c + 6772aca commit 392dc96

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

paddle/scripts/docker/Dockerfile

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

4+
ARG DEBIAN_FRONTEND=noninteractive
45
RUN apt-get update \
56
&& apt-get install -y cmake libprotobuf-dev protobuf-compiler git \
67
libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip \
@@ -12,6 +13,18 @@ RUN apt-get update \
1213
RUN pip install -U BeautifulSoup docopt PyYAML pillow \
1314
sphinx sphinx_rtd_theme breathe recommonmark
1415

16+
# cmake tends to hide and blur the dependencies between code modules, as
17+
# noted here https://github.com/PaddlePaddle/Paddle/issues/763. We are
18+
# thinking about using Bazel to fix this problem, e.g.,
19+
# https://github.com/PaddlePaddle/Paddle/issues/681#issuecomment-263996102. To
20+
# start the trail of fixing, we add Bazel to our Dockerfiles.
21+
RUN apt-get update && apt-get install -y curl software-properties-common \
22+
&& add-apt-repository ppa:webupd8team/java \
23+
&& echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections \
24+
&& echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
25+
&& curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
26+
&& apt-get update && apt-get install -y oracle-java8-installer bazel
27+
1528
ARG WITH_AVX
1629
ARG WITH_DOC
1730
ARG WITH_SWIG_PY

paddle/scripts/docker/Dockerfile.gpu

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

4+
ARG DEBIAN_FRONTEND=noninteractive
45
RUN apt-get update \
56
&& apt-get install -y cmake libprotobuf-dev protobuf-compiler git \
67
libgoogle-glog-dev libgflags-dev libatlas-dev libatlas3-base g++ m4 python-pip \
@@ -12,6 +13,18 @@ RUN apt-get update \
1213
RUN pip install -U BeautifulSoup docopt PyYAML pillow \
1314
sphinx sphinx_rtd_theme breathe recommonmark
1415

16+
# cmake tends to hide and blur the dependencies between code modules, as
17+
# noted here https://github.com/PaddlePaddle/Paddle/issues/763. We are
18+
# thinking about using Bazel to fix this problem, e.g.,
19+
# https://github.com/PaddlePaddle/Paddle/issues/681#issuecomment-263996102. To
20+
# start the trail of fixing, we add Bazel to our Dockerfiles.
21+
RUN apt-get update && apt-get install -y curl software-properties-common \
22+
&& add-apt-repository ppa:webupd8team/java \
23+
&& echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections \
24+
&& echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
25+
&& curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
26+
&& apt-get update && apt-get install -y oracle-java8-installer bazel
27+
1528
ARG WITH_AVX
1629
ARG WITH_DOC
1730
ARG WITH_SWIG_PY

0 commit comments

Comments
 (0)