Skip to content

Commit e2005e2

Browse files
Finish the bazel install before building. (#1135)
1 parent a4b2ae4 commit e2005e2

File tree

4 files changed

+22
-0
lines changed

4 files changed

+22
-0
lines changed

tools/docker/cpu_tests.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ RUN bash bazel.sh
1010
COPY requirements.txt ./
1111
RUN pip install -r requirements.txt
1212

13+
COPY tools/docker/finish_bazel_install.sh ./
14+
RUN bash finish_bazel_install.sh
15+
1316
COPY ./ /addons
1417
WORKDIR addons
1518
RUN bash tools/ci_testing/addons_cpu.sh --no-deps

tools/docker/finish_bazel_install.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
set -e
2+
# hack to have the dependecies in the docker cache
3+
# and have much faster local build with docker
4+
# can be removed once docker buildx/buildkit is stable
5+
# and we'll use "RUN --mount=cache ..." instead
6+
cd /tmp
7+
git clone https://github.com/tensorflow/addons.git
8+
cd addons
9+
python ./configure.py --no-deps
10+
bazel build --nobuild -- //tensorflow_addons/...
11+
cd ..
12+
rm -rf ./addons

tools/docker/gpu_tests.Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ RUN python3 -m pip install -r build-requirements.txt
77
COPY requirements.txt ./
88
RUN python3 -m pip install -r requirements.txt
99

10+
COPY tools/docker/finish_bazel_install.sh ./
11+
RUN bash finish_bazel_install.sh
12+
13+
1014
COPY ./ /addons
1115
WORKDIR addons
1216
CMD ["bash", "tools/ci_testing/addons_gpu.sh"]

tools/docker/sanity_check.Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ RUN apt-get update && apt-get install sudo
4545
COPY tools/ci_build/install/bazel.sh ./
4646
RUN bash bazel.sh
4747

48+
COPY tools/docker/finish_bazel_install.sh ./
49+
RUN bash finish_bazel_install.sh
50+
4851
COPY ./ /addons
4952
WORKDIR /addons
5053
RUN python ./configure.py --no-deps

0 commit comments

Comments
 (0)