diff --git a/tensorflow/Dockerfile b/tensorflow/Dockerfile index 78d750e49a3371e9ee711e2dd61fa3ad8a461485..fea8cb17e8274227b4899962132e99c64982b3cd 100644 --- a/tensorflow/Dockerfile +++ b/tensorflow/Dockerfile @@ -30,16 +30,11 @@ RUN mkdir -p /opt/bazel && \ rm -f /opt/bazel/installer.sh ARG TF_VERSION=1.15.3 -RUN git clone --recursive --branch v${TF_VERSION} https://github.com/tensorflow/tensorflow.git /opt/tensorflow/src - -COPY disable-enforced-bazel-build-mirror.patch /opt/tensorflow/patches/disable-enforced-bazel-build-mirror.patch -RUN sed -i '/https:\/\/mirror.bazel.build\/github.com\/pybind\/pybind11\/archive\/v2.3.0.tar.gz/d' /opt/tensorflow/src/tensorflow/workspace.bzl && \ - cd /opt/tensorflow/src && \ - patch -p1 -i /opt/tensorflow/patches/disable-enforced-bazel-build-mirror.patch +RUN git clone --recursive --branch ${TF_VERSION} https://git.imp.fu-berlin.de/bioroboticslab/robofish/vendor/tensorflow.git /opt/tensorflow/src RUN mkdir -p /opt/tensorflow/.venv && \ - python3.7 -m venv /opt/tensorflow/.venv/python3.7 && \ - . /opt/tensorflow/.venv/python3.7/bin/activate && \ + python3.8 -m venv /opt/tensorflow/.venv/python3.8 && \ + . /opt/tensorflow/.venv/python3.8/bin/activate && \ pip --no-cache-dir install --upgrade pip && \ pip --no-cache-dir install wheel && \ pip --no-cache-dir install \ @@ -63,9 +58,9 @@ ENV TF_CUDNN_VERSION=${CUDNN_MAJOR_VERSION} COPY tf_configure.bazelrc /opt/tensorflow/src/.tf_configure.bazelrc RUN cd /opt/tensorflow/src && \ - . /opt/tensorflow/.venv/python3.7/bin/activate && \ + . /opt/tensorflow/.venv/python3.8/bin/activate && \ bazel build \ - --action_env PYTHONPATH="/opt/tensorflow/.venv/python3.7/lib/python3.7/site-packages" \ + --action_env PYTHONPATH="/opt/tensorflow/.venv/python3.8/lib/python3.8/site-packages" \ --config=cuda --config=opt --config=mkl \ //tensorflow/tools/pip_package:build_pip_package && \ ./bazel-bin/tensorflow/tools/pip_package/build_pip_package /opt/tensorflow/build diff --git a/tensorflow/disable-enforced-bazel-build-mirror.patch b/tensorflow/disable-enforced-bazel-build-mirror.patch deleted file mode 100644 index e399696e4303498fcc0e8e6b0569117e96e35d61..0000000000000000000000000000000000000000 --- a/tensorflow/disable-enforced-bazel-build-mirror.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/third_party/repo.bzl 2020-06-29 16:54:49.000000000 +0200 -+++ b/third_party/repo.bzl 2020-06-29 17:20:42.594725313 +0200 -@@ -80,15 +80,6 @@ - _execute_and_check_ret_code(ctx, cmd) - - def _tf_http_archive(ctx): -- if ("mirror.tensorflow.org" not in ctx.attr.urls[0] and -- (len(ctx.attr.urls) < 2 and -- ctx.attr.name not in _SINGLE_URL_WHITELIST.to_list())): -- fail("tf_http_archive(urls) must have redundant URLs. The " + -- "mirror.tensorflow.org URL must be present and it must come first. " + -- "Even if you don't have permission to mirror the file, please " + -- "put the correctly formatted mirror URL there anyway, because " + -- "someone will come along shortly thereafter and mirror the file.") -- - use_syslib = _use_system_lib(ctx, ctx.attr.name) - if not use_syslib: - ctx.download_and_extract(