Skip to content

Commit

Permalink
Finish the bazel install before building. (tensorflow#1135)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieldemarmiesse committed Feb 24, 2020
1 parent a4b2ae4 commit e2005e2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/docker/cpu_tests.Dockerfile
Expand Up @@ -10,6 +10,9 @@ RUN bash bazel.sh
COPY requirements.txt ./
RUN pip install -r requirements.txt

COPY tools/docker/finish_bazel_install.sh ./
RUN bash finish_bazel_install.sh

COPY ./ /addons
WORKDIR addons
RUN bash tools/ci_testing/addons_cpu.sh --no-deps
Expand Down
12 changes: 12 additions & 0 deletions tools/docker/finish_bazel_install.sh
@@ -0,0 +1,12 @@
set -e
# hack to have the dependecies in the docker cache
# and have much faster local build with docker
# can be removed once docker buildx/buildkit is stable
# and we'll use "RUN --mount=cache ..." instead
cd /tmp
git clone https://github.com/tensorflow/addons.git
cd addons
python ./configure.py --no-deps
bazel build --nobuild -- //tensorflow_addons/...
cd ..
rm -rf ./addons
4 changes: 4 additions & 0 deletions tools/docker/gpu_tests.Dockerfile
Expand Up @@ -7,6 +7,10 @@ RUN python3 -m pip install -r build-requirements.txt
COPY requirements.txt ./
RUN python3 -m pip install -r requirements.txt

COPY tools/docker/finish_bazel_install.sh ./
RUN bash finish_bazel_install.sh


COPY ./ /addons
WORKDIR addons
CMD ["bash", "tools/ci_testing/addons_gpu.sh"]
3 changes: 3 additions & 0 deletions tools/docker/sanity_check.Dockerfile
Expand Up @@ -45,6 +45,9 @@ RUN apt-get update && apt-get install sudo
COPY tools/ci_build/install/bazel.sh ./
RUN bash bazel.sh

COPY tools/docker/finish_bazel_install.sh ./
RUN bash finish_bazel_install.sh

COPY ./ /addons
WORKDIR /addons
RUN python ./configure.py --no-deps
Expand Down

0 comments on commit e2005e2

Please sign in to comment.