Skip to content

Commit 2d3d930

Browse files
committed
Add python3.5 support to Ubuntu Dockerfile
test=release/1.0.0
1 parent 8d16de7 commit 2d3d930

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Dockerfile

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ ENV HOME /root
2222
# Add bash enhancements
2323
COPY ./paddle/scripts/docker/root/ /root/
2424

25-
RUN apt-get update && \
26-
apt-get install -y --allow-downgrades patchelf \
25+
RUN apt-get update || \
26+
apt-get install -y --allow-unauthenticated libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0
27+
28+
RUN apt-get install -y --allow-downgrades patchelf \
2729
git python-pip python-dev python-opencv openssh-server bison \
28-
libnccl2=2.1.2-1+cuda8.0 libnccl-dev=2.1.2-1+cuda8.0 \
30+
python3 python3-pip python3-dev \
2931
wget unzip unrar tar xz-utils bzip2 gzip coreutils ntp \
3032
curl sed grep graphviz libjpeg-dev zlib1g-dev \
3133
python-matplotlib gcc-4.8 g++-4.8 \
@@ -73,22 +75,32 @@ RUN localedef -i en_US -f UTF-8 en_US.UTF-8
7375
RUN easy_install -U pip && \
7476
pip install -U wheel && \
7577
pip install -U docopt PyYAML sphinx==1.5.6 && \
76-
pip install sphinx-rtd-theme==0.1.9 recommonmark
78+
pip install sphinx-rtd-theme==0.1.9 recommonmark && \
79+
pip3 install --upgrade pip && \
80+
pip3 install -U wheel && \
81+
pip3 install -U docopt PyYAML sphinx==1.5.6 && \
82+
pip3 install sphinx-rtd-theme==0.1.9 recommonmark
7783

7884
RUN pip install pre-commit 'ipython==5.3.0' && \
7985
pip install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
80-
pip install opencv-python
86+
pip install opencv-python && \
87+
pip3 install pre-commit 'ipython==5.3.0' && \
88+
pip3 install 'ipykernel==4.6.0' 'jupyter==1.0.0' && \
89+
pip3 install opencv-python
8190

8291
#For docstring checker
8392
RUN pip install pylint pytest astroid isort LinkChecker
93+
RUN pip3 install pylint pytest astroid isort
8494

8595
COPY ./python/requirements.txt /root/
8696
RUN pip install -r /root/requirements.txt
97+
RUN pip3 install -r /root/requirements.txt
8798

8899
# To fix https://github.com/PaddlePaddle/Paddle/issues/1954, we use
89100
# the solution in https://urllib3.readthedocs.io/en/latest/user-guide.html#ssl-py2
90101
RUN apt-get install -y libssl-dev libffi-dev
91102
RUN pip install certifi urllib3[secure]
103+
RUN pip3 install certifi urllib3[secure]
92104

93105

94106
# Install woboq_codebrowser to /woboq

0 commit comments

Comments
 (0)