Skip to content

Commit ec98053

Browse files
author
peisun1115
committed
1 parent c0f5625 commit ec98053

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

pip_pkg_scripts/build.Dockerfile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,31 @@
11
FROM tensorflow/tensorflow:custom-op-ubuntu16
22

3-
ENV GITHUB_BRANCH="master"
43
ENV PYTHON_VERSION="3"
54
ENV PYTHON_MINOR_VERSION=""
65
ENV PIP_MANYLINUX2010="1"
76
ENV TF_VERSION="1.15.0"
8-
97
RUN wget https://github.com/bazelbuild/bazel/releases/download/3.1.0/bazel-3.1.0-installer-linux-x86_64.sh > /dev/null
108
RUN bash bazel-3.1.0-installer-linux-x86_64.sh
11-
129
# There are some problems with the python3 installation from custom-op-ubuntu16.
1310
# Remove it and install new ones.
1411
RUN apt-get remove --purge -y python3.5 python3.6
1512
RUN rm -f /etc/apt/sources.list.d/jonathonf-ubuntu-python-3_6-xenial.list
1613
RUN apt-key del F06FC659
17-
1814
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776
1915
RUN echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" > /etc/apt/sources.list.d/deadsnakes-ppa-xenial.list
2016
RUN apt-get update && apt-get install -y python3.5 python3.6 python3.7 python3.8 python3.8-distutils
2117
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
22-
2318
RUN for python in python3.5 python3.6 python3.7 python3.8; do \
2419
$python get-pip.py && \
2520
$python -m pip install --upgrade pip setuptools auditwheel && \
2621
$python -m pip install --upgrade grpcio>=1.24.3; \
2722
done
2823

29-
COPY pip_pkg_scripts/build.sh /
30-
31-
VOLUME /tmp/pip_pkg_build
24+
VOLUME /tmp/artifacts
25+
COPY . /tmp/repo
26+
WORKDIR /tmp/repo
3227

33-
ENTRYPOINT ["/build.sh"]
28+
ENTRYPOINT ["pip_pkg_scripts/build.sh"]
3429

3530
# The default parameters for the build.sh
3631
CMD []

pip_pkg_scripts/build.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,22 +46,17 @@ ${PIP} install tensorflow-gpu=="${TF_VERSION}" --user
4646
# bazel.
4747
python3 -m pip install --upgrade tensorflow-gpu=="${TF_VERSION}" --user
4848

49-
rm -rf waymo-od || true
50-
git clone https://github.com/waymo-research/waymo-open-dataset.git waymo-od
51-
cd waymo-od
52-
53-
git checkout remotes/origin/${GITHUB_BRANCH}
54-
5549
./configure.sh
5650

5751
bazel clean
5852
bazel build ...
5953
bazel test ...
6054

61-
DST_DIR="/tmp/pip_pkg_build"
55+
DST_DIR="/tmp/artifacts"
6256
rm -rf "$DST_DIR" || true
6357
./pip_pkg_scripts/build_pip_pkg.sh "$DST_DIR" ${PYTHON_VERSION}
6458
# Comment the following line if you run this outside of the container.
6559
if [[ "${PIP_MANYLINUX2010}" == "1" ]]; then
6660
find "$DST_DIR" -name *.whl | xargs ./third_party/auditwheel.sh repair --plat manylinux2010_x86_64 -w "$DST_DIR"
6761
fi
62+

0 commit comments

Comments
 (0)