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

Update ubuntu image & add tensorflow image

parent 7c1b6cf8
No related branches found
No related tags found
No related merge requests found
Pipeline #30163 failed
......@@ -10,8 +10,9 @@ build ubuntu:
- CACHE_FILE="/var/lib/gitlab-runner/.local/share/gpu-driver-version"
- if [[ -f $CACHE_FILE ]] && [[ "$(cat $CACHE_FILE)" == "$GPU_DRIVER_VERSION" ]]; then OPTS=''; else OPTS='--no-cache'; fi
- echo -n $GPU_DRIVER_VERSION > $CACHE_FILE
- image_name="${CI_REGISTRY}/${CI_PROJECT_PATH,,}/ubuntu"
- docker build $OPTS --pull -t "${image_name}" -f ubuntu/Dockerfile ubuntu
- image_name="${CI_REGISTRY}/${CI_PROJECT_PATH,,}"
- docker build $OPTS --pull -t "${image_name}/ubuntu" -f ubuntu/Dockerfile ubuntu
- docker build --build-arg TF_VERSION=1.15.2 $OPTS --pull -t "${image_name}/tensorflow:1.15.2" -f tensorflow/Dockerfile tensorflow
deploy ubuntu:
stage: deploy
......@@ -21,7 +22,8 @@ deploy ubuntu:
before_script:
- echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" "${CI_REGISTRY}" --password-stdin
script:
- image_name="${CI_REGISTRY}/${CI_PROJECT_PATH,,}/ubuntu"
- docker push "${image_name}"
- image_name="${CI_REGISTRY}/${CI_PROJECT_PATH,,}"
- docker push "${image_name}/ubuntu"
- docker push "${image_name}/tensorflow:1.15.2"
after_script:
- docker logout "${CI_REGISTRY}"
This diff is collapsed.
# SPDX-License-Identifier: Apache-2.0
FROM git.imp.fu-berlin.de:5000/bioroboticslab/robofish/docker/ubuntu
LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get install -y \
openjdk-11-jdk \
swig \
libcurl3-dev \
libfreetype6-dev \
libhdf5-serial-dev \
libzmq3-dev \
zlib1g-dev \
&& \
apt-get clean
RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
echo "/usr/local/cuda/lib64/stubs" > /etc/ld.so.conf.d/z-cuda-stubs.conf && \
ldconfig
ARG BAZEL_VERSION
ENV BAZEL_VERSION ${BAZEL_VERSION:-0.26.1}
RUN mkdir -p /opt/bazel && \
wget -O /opt/bazel/installer.sh "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-linux-x86_64.sh" && \
wget -O /opt/bazel/LICENSE.txt "https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE" && \
chmod +x /opt/bazel/installer.sh && \
/opt/bazel/installer.sh && \
rm -f /opt/bazel/installer.sh
ARG TF_VERSION
ENV TF_VERSION ${TF_VERSION:-1.15.2}
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 mkdir -p /opt/tensorflow/.venv && \
python3.7 -m venv /opt/tensorflow/.venv/python3.7 && \
. /opt/tensorflow/.venv/python3.7/bin/activate && \
pip --no-cache-dir install --upgrade pip && \
pip --no-cache-dir install \
wheel \
Pillow \
h5py \
keras_preprocessing \
matplotlib \
mock \
'numpy<1.19.0' \
scipy \
sklearn \
pandas \
future \
portpicker
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:/usr/include/x64_64-linux-gnu:$LD_LIBRARY_PATH
ENV TF_NEED_CUDA 1
ENV TF_NEED_TENSORRT 1
ENV TF_CUDA_VERSION=${CUDA}
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 && \
bazel build \
--action_env PYTHONPATH="/opt/tensorflow/.venv/python3.7/lib/python3.7/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
--- 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(
build:xla --define with_xla_support=true
build --config=xla
build --config=tensorrt
build --action_env TMP="/tmp"
build --action_env TF_CUDA_COMPUTE_CAPABILITIES="3.0,6.1,7.5"
build --action_env GCC_HOST_COMPILER_PATH="/usr/bin/gcc"
build --config=cuda
build:opt --copt=-march=native
build:opt --copt=-Wno-sign-compare
build:opt --host_copt=-march=native
build:opt --define with_default_optimizations=true
test --flaky_test_attempts=3
test --test_size_filters=small,medium
test --test_tag_filters=-benchmark-test,-no_oss,-oss_serial
test --build_tag_filters=-benchmark-test,-no_oss
test --test_tag_filters=-no_gpu
test --build_tag_filters=-no_gpu
test --test_env=LD_LIBRARY_PATH
build --action_env TF_CONFIGURE_IOS="0"
# SPDX-License-Identifier: AGPL-3.0-or-later
FROM nvidia/cudagl:10.0-runtime-ubuntu18.04
# SPDX-License-Identifier: Apache-2.0
ARG UBUNTU_VERSION=18.04
ARG CUDA=10.0
FROM nvidia/cudagl:${CUDA}-base-ubuntu${UBUNTU_VERSION}
LABEL maintainer="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
LABEL authors="Moritz Maxeiner <moritz.maxeiner@fu-berlin.de>"
ENV TZ=Europe/Berlin
ENV DEBIAN_FRONTEND=noninteractive
ARG CUDA
ARG CUDNN
ARG CUDNN_MAJOR_VERSION
ARG LIBNVINFER
ARG LIBNVINFER_MAJOR_VERSION
ENV CUDA ${CUDA}
ENV CUDNN ${CUDNN:-7.6.4.38-1}
ENV CUDNN_MAJOR_VERSION ${CUDNN_MAJOR_VERSION:-7}
ENV LIBNVINFER ${LIBNVINFER:-6.0.1-1}
ENV LIBNVINFER_MAJOR_VERSION ${LIBNVINFER_MAJOR_VERSION:-6}
ENV CUDA_TOOLKIT_PATH /usr/local/cuda-${CUDA}
ARG TZ=Europe/Berlin
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends apt-utils >/dev/null 2>&1 && \
apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get update && \
apt-get install -y locales && \
locale-gen en_US.UTF-8 && \
......@@ -19,15 +36,50 @@ RUN apt-get update && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata && \
apt-get install -y --no-install-recommends \
build-essential \
pkg-config \
git \
file \
nano && \
nano \
zip \
unzip \
curl \
wget \
rsync \
&& \
apt-get install -y \
python3-dev \
python3-pip \
python3-venv \
python3-setuptools \
python3-distutils && \
python3-distutils \
&& \
apt-get clean
SHELL ["/bin/bash", "-c"]
RUN apt-get update && \
apt-get install -y --no-install-recommends \
cuda-command-line-tools-${CUDA/./-} \
libcublas10=10.2.1.243-1 \
libcublas-dev=10.2.1.243-1 \
cuda-nvrtc-${CUDA/./-} \
cuda-nvrtc-dev-${CUDA/./-} \
cuda-cudart-dev-${CUDA/./-} \
cuda-cufft-dev-${CUDA/./-} \
cuda-curand-dev-${CUDA/./-} \
cuda-cusolver-dev-${CUDA/./-} \
cuda-cusparse-dev-${CUDA/./-} \
libcudnn7=${CUDNN}+cuda${CUDA} \
libcudnn7-dev=${CUDNN}+cuda${CUDA} \
&& \
find /usr/local/cuda-${CUDA}/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete && \
rm /usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a && \
apt-get install -y --no-install-recommends \
libnvinfer${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA} \
libnvinfer-dev=${LIBNVINFER}+cuda${CUDA} \
libnvinfer-plugin-dev=${LIBNVINFER}+cuda${CUDA} \
libnvinfer-plugin${LIBNVINFER_MAJOR_VERSION}=${LIBNVINFER}+cuda${CUDA}
RUN apt-get update && \
apt-get install -y \
libglu1-mesa \
......@@ -40,7 +92,15 @@ RUN apt-get update && \
RUN apt-get install -y \
python3.7 \
python3.7-dev \
python3.7-venv && \
python3.7-venv \
&& \
apt-get clean
RUN apt-get install -y \
python3.8 \
python3.8-dev \
python3.8-venv \
&& \
apt-get clean
ADD agki-nas01.imp.fu-berlin.de-ca-cert.crt /usr/local/share/ca-certificates/agki-nas01.imp.fu-berlin.de-ca-cert.crt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment