Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Department Computational Biology
deepFPlearn
Commits
10f45d6b
Commit
10f45d6b
authored
Apr 29, 2022
by
Matthias Bernt
Browse files
update dockerfile
parent
21896d54
Pipeline
#139290
failed with stages
in 7 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
container/Dockerfile
View file @
10f45d6b
FROM
tensorflow/tensorflow:2.6.0-gpu
# This file is based on
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/dockerfiles/dockerfiles/gpu.Dockerfile#L104
# https://github.com/tensorflow/tensorflow/commit/02956a52930bea96f57401d39a834e13047bad9a
# instead of installing tensorflow-gpu, dfpl is installed which included tensorflow-gpu (2.6)
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ============================================================================
#
# THIS IS A GENERATED DOCKERFILE.
#
# This file was assembled from multiple pieces, whose use is documented
# throughout. Please refer to the TensorFlow dockerfiles documentation
# for more information.
ARG
UBUNTU_VERSION=20.04
ARG
ARCH=
ARG
CUDA=11.2
FROM
nvidia/cuda${ARCH:+-$ARCH}:${CUDA}.1-base-ubuntu${UBUNTU_VERSION}
as
base
# ARCH and CUDA are specified again because the FROM directive resets ARGs
# (but their default value is retained if set previously)
ARG
ARCH=x86_64
ARG
CUDA=11.2
ARG
CUDNN=8.1.0.77-1
ARG
CUDNN_MAJOR_VERSION=8
ARG
LIB_DIR_PREFIX=x86_64
ARG
LIBNVINFER=7.2.2-1
ARG
LIBNVINFER_MAJOR_VERSION=7
# Let us install tzdata painlessly
ENV
DEBIAN_FRONTEND=noninteractive
# Needed for string substitution
SHELL
["/bin/bash", "-c"]
RUN
sh
-c
'echo "APT { Get { AllowUnauthenticated \"1\"; }; };" > /etc/apt/apt.conf.d/99allow_unauth'
RUN
apt
-o
Acquire::AllowInsecureRepositories
=
true
-o
Acquire::AllowDowngradeToInsecureRepositories
=
true
update
RUN
apt-get
install
-y
curl wget
RUN
apt-key del 7fa2af80
RUN
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-keyring_1.0-1_all.deb
RUN
dpkg
-i
cuda-keyring_1.0-1_all.deb
RUN
rm
-f
/etc/apt/sources.list.d/cuda.list /etc/apt/apt.conf.d/99allow_unauth cuda-keyring_1.0-1_all.deb
RUN
apt-key adv
--keyserver
keyserver.ubuntu.com
--recv-keys
A4B469963BF863CC F60F4B3D7FA2AF80
RUN
apt-get update
&&
apt-get
install
-y
--no-install-recommends
\
build-essential
\
cuda-command-line-tools-
${
CUDA
/./-
}
\
libcublas-
${
CUDA
/./-
}
\
cuda-nvrtc-
${
CUDA
/./-
}
\
libcufft-
${
CUDA
/./-
}
\
libcurand-
${
CUDA
/./-
}
\
libcusolver-
${
CUDA
/./-
}
\
libcusparse-
${
CUDA
/./-
}
\
curl
\
libcudnn8
=
${
CUDNN
}
+cuda
${
CUDA
}
\
libfreetype6-dev
\
libhdf5-serial-dev
\
libzmq3-dev
\
pkg-config
\
software-properties-common
\
unzip
# Install TensorRT if not building for PowerPC
# NOTE: libnvinfer uses cuda11.1 versions
RUN
[[
"
${
ARCH
}
"
=
"ppc64le"
]]
||
{
apt-get update
&&
\
apt-key adv
--fetch-keys
https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
&&
\
echo
"deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 /"
>
/etc/apt/sources.list.d/tensorRT.list
&&
\
apt-get update
&&
\
apt-get
install
-y
--no-install-recommends
libnvinfer
${
LIBNVINFER_MAJOR_VERSION
}
=
${
LIBNVINFER
}
+cuda11.0
\
libnvinfer-plugin
${
LIBNVINFER_MAJOR_VERSION
}
=
${
LIBNVINFER
}
+cuda11.0
\
&&
apt-get clean
\
&&
rm
-rf
/var/lib/apt/lists/
*
;
}
# For CUDA profiling, TensorFlow requires CUPTI.
ENV
LD_LIBRARY_PATH /usr/local/cuda-11.0/targets/x86_64-linux/lib:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:$LD_LIBRARY_PATH
# Link the libcuda stub to the location where tensorflow is searching for it and reconfigure
# dynamic linker run-time bindings
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
# See http://bugs.python.org/issue19846
ENV
LANG C.UTF-8
RUN
apt-get update
&&
apt-get
install
-y
\
python3
\
python3-pip
RUN
python3
-m
pip
--no-cache-dir
install
--upgrade
\
"pip<20.3"
\
setuptools
# Some TF tools expect a "python" binary
RUN
ln
-s
$(
which python3
)
/usr/local/bin/python
# copy dfpl sources for installation
# unfortunatelly COPY setup.py README.md dfpl/ /deepFPlearn/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment