Skip to content
Snippets Groups Projects
Commit a09c8432 authored by calrama's avatar calrama
Browse files

[tensorflow] use python3.8, switch to using robofish fork of tensorflow

parent 0364a978
No related branches found
No related tags found
No related merge requests found
Pipeline #30660 passed
...@@ -30,16 +30,11 @@ RUN mkdir -p /opt/bazel && \ ...@@ -30,16 +30,11 @@ RUN mkdir -p /opt/bazel && \
rm -f /opt/bazel/installer.sh rm -f /opt/bazel/installer.sh
ARG TF_VERSION=1.15.3 ARG TF_VERSION=1.15.3
RUN git clone --recursive --branch v${TF_VERSION} https://github.com/tensorflow/tensorflow.git /opt/tensorflow/src RUN git clone --recursive --branch ${TF_VERSION} https://git.imp.fu-berlin.de/bioroboticslab/robofish/vendor/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 mkdir -p /opt/tensorflow/.venv && \ RUN mkdir -p /opt/tensorflow/.venv && \
python3.7 -m venv /opt/tensorflow/.venv/python3.7 && \ python3.8 -m venv /opt/tensorflow/.venv/python3.8 && \
. /opt/tensorflow/.venv/python3.7/bin/activate && \ . /opt/tensorflow/.venv/python3.8/bin/activate && \
pip --no-cache-dir install --upgrade pip && \ pip --no-cache-dir install --upgrade pip && \
pip --no-cache-dir install wheel && \ pip --no-cache-dir install wheel && \
pip --no-cache-dir install \ pip --no-cache-dir install \
...@@ -63,9 +58,9 @@ ENV TF_CUDNN_VERSION=${CUDNN_MAJOR_VERSION} ...@@ -63,9 +58,9 @@ ENV TF_CUDNN_VERSION=${CUDNN_MAJOR_VERSION}
COPY tf_configure.bazelrc /opt/tensorflow/src/.tf_configure.bazelrc COPY tf_configure.bazelrc /opt/tensorflow/src/.tf_configure.bazelrc
RUN cd /opt/tensorflow/src && \ RUN cd /opt/tensorflow/src && \
. /opt/tensorflow/.venv/python3.7/bin/activate && \ . /opt/tensorflow/.venv/python3.8/bin/activate && \
bazel build \ 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 \ --config=cuda --config=opt --config=mkl \
//tensorflow/tools/pip_package:build_pip_package && \ //tensorflow/tools/pip_package:build_pip_package && \
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /opt/tensorflow/build ./bazel-bin/tensorflow/tools/pip_package/build_pip_package /opt/tensorflow/build
--- 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(
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment