aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tools/docker
diff options
context:
space:
mode:
authorGravatar Clayne Robison <clayne.b.robison@intel.com>2018-06-28 22:17:54 -0700
committerGravatar Gunhan Gulsoy <gunan@google.com>2018-06-28 22:17:54 -0700
commitb7300de4ef75bdd9373bccc4ae5b98135a70287b (patch)
tree27d114de76b306ebbf7f4a84ae5db57af0e49b56 /tensorflow/tools/docker
parentc676a9680a66181598ad4321ed371a965f04ee2d (diff)
Adding support to checkout both branches and tags; Adding parameters to build-dev-container.sh so that it can build at any branch or tag. (#20393)
Diffstat (limited to 'tensorflow/tools/docker')
-rwxr-xr-xtensorflow/tools/docker/Dockerfile.devel-mkl17
1 files changed, 14 insertions, 3 deletions
diff --git a/tensorflow/tools/docker/Dockerfile.devel-mkl b/tensorflow/tools/docker/Dockerfile.devel-mkl
index aa6d027662..de44ba2173 100755
--- a/tensorflow/tools/docker/Dockerfile.devel-mkl
+++ b/tensorflow/tools/docker/Dockerfile.devel-mkl
@@ -1,6 +1,6 @@
FROM ubuntu:16.04
-LABEL maintainer="Clayne Robison <clayne.b.robison@intel.com>"
+LABEL maintainer="Clayne Robison <clayne.b.robison@intel.com>"
# These parameters can be overridden by parameterized_docker_build.sh
ARG TF_BUILD_VERSION=r1.9
@@ -86,7 +86,18 @@ RUN mkdir /bazel && \
# Download and build TensorFlow.
WORKDIR /tensorflow
-RUN git clone --branch=${TF_BUILD_VERSION} --depth=1 https://github.com/tensorflow/tensorflow.git .
+
+# Download and build TensorFlow.
+# Enable checking out both tags and branches
+RUN export TAG_PREFIX="v" && \
+ echo ${TF_BUILD_VERSION} | grep -q ^${TAG_PREFIX}; \
+ if [ $? -eq 0 ]; then \
+ git clone --depth=1 https://github.com/tensorflow/tensorflow.git . && \
+ git fetch --tags && \
+ git checkout ${TF_BUILD_VERSION}; \
+ else \
+ git clone --depth=1 --branch=${TF_BUILD_VERSION} https://github.com/tensorflow/tensorflow.git . ; \
+ fi
RUN yes "" | ${PYTHON} configure.py
@@ -103,7 +114,7 @@ COPY .bazelrc /root/.bazelrc
RUN tensorflow/tools/ci_build/builds/configured CPU \
bazel --bazelrc=/root/.bazelrc build -c opt \
- tensorflow/tools/pip_package:build_pip_package && \
+ tensorflow/tools/pip_package:build_pip_package && \
bazel-bin/tensorflow/tools/pip_package/build_pip_package "${WHL_DIR}" && \
${PIP} --no-cache-dir install --upgrade "${WHL_DIR}"/tensorflow-*.whl && \
rm -rf /root/.cache