1# Copyright 2018 Google Inc. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14# 15################################################################################ 16 17FROM gcr.io/oss-fuzz-base/base-builder 18 19RUN apt-get update && apt-get install -y --no-install-recommends \ 20 curl \ 21 rsync \ 22 && \ 23 apt-get clean && \ 24 rm -rf /var/lib/apt/lists/* 25RUN python3 -m pip install numpy 26 27# Due to Bazel bug, need to symlink python3 to python 28# See https://github.com/bazelbuild/bazel/issues/8665 29RUN ln -s /usr/local/bin/python3 /usr/local/bin/python 30 31# Install Bazelisk to keep bazel in sync with the version required by TensorFlow 32RUN curl -Lo /usr/bin/bazel \ 33 https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64 \ 34 && \ 35 chmod +x /usr/bin/bazel 36 37RUN git clone --depth 1 https://github.com/tensorflow/tensorflow tensorflow 38WORKDIR $SRC/tensorflow 39COPY build.sh $SRC/ 40