Skip to content

Commit 3549499

Browse files
jhseugunan
authored andcommitted
Switch back to Ubuntu 14.04 for our releases. (tensorflow#8373)
* Revert "Update CI Docker images to Ubuntu 16.04" This reverts commit d7dc130. * Fix the old Dockerfile * Delete trusty add-apt-repository * Fixes * Upgrade protobuf * Fix build * Explicitly specify pip2 * Fix the cmake build
1 parent 1a1bac3 commit 3549499

File tree

11 files changed

+160
-28
lines changed

11 files changed

+160
-28
lines changed

tensorflow/tools/ci_build/Dockerfile.android

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:14.04
22

33
MAINTAINER Jan Prach <[email protected]>
44

tensorflow/tools/ci_build/Dockerfile.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ COPY install/*.sh /install/
77
RUN /install/install_bootstrap_deb_packages.sh
88
RUN /install/install_deb_packages.sh
99

10+
RUN apt-get update
11+
RUN apt-get install -y --no-install-recommends python-pip
1012
RUN pip install --upgrade numpy
1113

1214
# Install golang
1315
RUN add-apt-repository -y ppa:ubuntu-lxc/lxd-stable
14-
RUN apt-get update
1516
RUN apt-get install -y golang

tensorflow/tools/ci_build/Dockerfile.cpu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:14.04
22

33
MAINTAINER Jan Prach <[email protected]>
44

tensorflow/tools/ci_build/Dockerfile.gpu

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
1+
FROM nvidia/cuda:8.0-cudnn5-devel-ubuntu14.04
22

33
MAINTAINER Jan Prach <[email protected]>
44

5+
# In the Ubuntu 14.04 images, cudnn is placed in system paths. Move them to
6+
# /usr/local/cuda
7+
RUN cp /usr/include/cudnn.h /usr/local/cuda/include
8+
RUN cp /usr/lib/x86_64-linux-gnu/libcudnn* /usr/local/cuda/lib64
9+
510
# Copy and run the install scripts.
611
COPY install/*.sh /install/
712
RUN /install/install_bootstrap_deb_packages.sh

tensorflow/tools/ci_build/Dockerfile.hadoop

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:14.04
22

33
MAINTAINER Jonathan Hseu <[email protected]>
44

tensorflow/tools/ci_build/Dockerfile.tensorboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:14.04
22

33
MAINTAINER Jan Prach <[email protected]>
44

tensorflow/tools/ci_build/ci_parameterized_build.sh

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
# The script obeys the following required environment variables:
2121
# TF_BUILD_CONTAINER_TYPE: (CPU | GPU | ANDROID | ANDROID_FULL)
22-
# TF_BUILD_PYTHON_VERSION: (PYTHON2 | PYTHON3)
22+
# TF_BUILD_PYTHON_VERSION: (PYTHON2 | PYTHON3 | PYTHON3.5)
2323
# TF_BUILD_IS_PIP: (NO_PIP | PIP | BOTH)
2424
#
2525
# The below environment variable is required, but will be deprecated together
@@ -33,7 +33,8 @@
3333
# ANDROID & PIP (Android and PIP builds are mutually exclusive)
3434
#
3535
# 2) TF_BUILD_PYTHON_VERSION is set to PYTHON3, the build will use the version
36-
# pointed to by "which python3" on the system.
36+
# pointed to by "which python3" on the system, which is typically python3.4. To
37+
# build for python3.5, set the environment variable to PYTHON3.5
3738
#
3839
#
3940
# Additionally, the script follows the directions of optional environment
@@ -419,7 +420,9 @@ fi
419420
# Process Python version
420421
if [[ ${TF_BUILD_PYTHON_VERSION} == "python2" ]]; then
421422
:
422-
elif [[ ${TF_BUILD_PYTHON_VERSION} == "python3" ]]; then
423+
elif [[ ${TF_BUILD_PYTHON_VERSION} == "python3" || \
424+
${TF_BUILD_PYTHON_VERSION} == "python3.4" || \
425+
${TF_BUILD_PYTHON_VERSION} == "python3.5" ]]; then
423426
# Supply proper environment variable to select Python 3
424427
if [[ "${DO_DOCKER}" == "1" ]]; then
425428
EXTRA_PARAMS="${EXTRA_PARAMS} -e CI_BUILD_PYTHON=${TF_BUILD_PYTHON_VERSION}"
@@ -486,6 +489,30 @@ echo ""
486489

487490
TMP_DIR=""
488491
DOCKERFILE_FLAG=""
492+
if [[ "${TF_BUILD_PYTHON_VERSION}" == "python3.5" ]]; then
493+
# Modify Dockerfile for Python3.5 build
494+
TMP_DIR=$(mktemp -d)
495+
echo "Docker build will occur in temporary directory: ${TMP_DIR}"
496+
497+
# Copy the files required for the docker build
498+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
499+
cp -r "${SCRIPT_DIR}/install" "${TMP_DIR}/install" || \
500+
die "ERROR: Failed to copy directory ${SCRIPT_DIR}/install"
501+
502+
DOCKERFILE="${SCRIPT_DIR}/Dockerfile.${TF_BUILD_CONTAINER_TYPE}"
503+
cp "${DOCKERFILE}" "${TMP_DIR}/" || \
504+
die "ERROR: Failed to copy Dockerfile at ${DOCKERFILE}"
505+
DOCKERFILE="${TMP_DIR}/Dockerfile.${TF_BUILD_CONTAINER_TYPE}"
506+
507+
# Replace a line in the Dockerfile
508+
sed -i \
509+
's/RUN \/install\/install_pip_packages.sh/RUN \/install\/install_python3.5_pip_packages.sh/g' \
510+
"${DOCKERFILE}" && \
511+
echo "Copied and modified Dockerfile for Python 3.5 build: ${DOCKERFILE}" || \
512+
die "ERROR: Faild to copy and modify Dockerfile: ${DOCKERFILE}"
513+
514+
DOCKERFILE_FLAG="--dockerfile ${DOCKERFILE}"
515+
fi
489516

490517
chmod +x ${TMP_SCRIPT}
491518

tensorflow/tools/ci_build/ci_sanity.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ do_pylint() {
105105
if [[ $1 == "PYTHON2" ]]; then
106106
PYLINT_BIN="python /usr/local/lib/python2.7/dist-packages/pylint/lint.py"
107107
elif [[ $1 == "PYTHON3" ]]; then
108-
PYLINT_BIN="python3 /usr/local/lib/python3.5/dist-packages/pylint/lint.py"
108+
PYLINT_BIN="python3 /usr/local/lib/python3.4/dist-packages/pylint/lint.py"
109109
else
110110
echo "Unrecognized python version (PYTHON2 | PYTHON3): $1"
111111
return 1

tensorflow/tools/ci_build/install/install_deb_packages.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ apt-get install -y --no-install-recommends \
4242
openjdk-8-jre-headless \
4343
pkg-config \
4444
python-dev \
45-
python-pip \
45+
python-setuptools \
46+
python-virtualenv \
4647
python3-dev \
47-
python3-pip \
48+
python3-setuptools \
4849
rsync \
4950
sudo \
5051
swig \
5152
unzip \
52-
virtualenv \
5353
wget \
5454
zip \
5555
zlib1g-dev

tensorflow/tools/ci_build/install/install_pip_packages.sh

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,56 +16,64 @@
1616

1717
set -e
1818

19+
# We don't apt-get install so that we can install a newer version of pip. Not
20+
# needed after we upgrade to Ubuntu 16.04
21+
easy_install -U pip
22+
easy_install3 -U pip
23+
1924
# Install pip packages from whl files to avoid the time-consuming process of
2025
# building from source.
2126

22-
pip install wheel
27+
pip2 install wheel
2328
pip3 install wheel
2429

2530
# Install six.
26-
pip install --upgrade six==1.10.0
31+
pip2 install --upgrade six==1.10.0
2732
pip3 install --upgrade six==1.10.0
2833

2934
# Install werkzeug.
30-
pip install --upgrade werkzeug==0.11.10
35+
pip2 install --upgrade werkzeug==0.11.10
3136
pip3 install --upgrade werkzeug==0.11.10
3237

3338
# Install protobuf.
34-
pip install --upgrade protobuf==3.2.0
39+
pip2 install --upgrade protobuf==3.2.0
3540
pip3 install --upgrade protobuf==3.2.0
3641

3742
# Remove obsolete version of six, which can sometimes confuse virtualenv.
3843
rm -rf /usr/lib/python3/dist-packages/six*
3944

40-
pip install --upgrade numpy==1.12.0
41-
pip3 install --upgrade numpy==1.12.0
45+
# numpy needs to be installed from source to fix segfaults. See:
46+
# https://github.com/tensorflow/tensorflow/issues/6968
47+
# This workaround isn't needed for Ubuntu 16.04 or later.
48+
pip2 install --no-binary=:all: --upgrade numpy==1.12.0
49+
pip3 install --no-binary=:all: --upgrade numpy==1.12.0
4250

43-
pip install scipy==0.18.1
51+
pip2 install scipy==0.18.1
4452
pip3 install scipy==0.18.1
4553

46-
pip install scikit-learn==0.18.1
54+
pip2 install scikit-learn==0.18.1
4755
pip3 install scikit-learn==0.18.1
4856

4957
# pandas required by tf.learn/inflow
50-
pip install pandas==0.19.2
58+
pip2 install pandas==0.19.2
5159
pip3 install pandas==0.19.2
5260

5361
# Benchmark tests require the following:
54-
pip install psutil
62+
pip2 install psutil
5563
pip3 install psutil
56-
pip install py-cpuinfo
64+
pip2 install py-cpuinfo
5765
pip3 install py-cpuinfo
5866

5967
# pylint tests require the following:
60-
pip install pylint
68+
pip2 install pylint
6169
pip3 install pylint
6270

6371
# pep8 tests require the following:
64-
pip install pep8
72+
pip2 install pep8
6573
pip3 install pep8
6674

6775
# tf.mock require the following for python2:
68-
pip install mock
76+
pip2 install mock
6977

70-
pip install portpicker
78+
pip2 install portpicker
7179
pip3 install portpicker

0 commit comments

Comments
 (0)