-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker118.base
95 lines (83 loc) · 3.29 KB
/
docker118.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
#FROM nvidia/cuda:12.6.1-cudnn-devel-ubuntu22.04
# Tell the CUDA environment what GPU features to expose in the container.
ENV NVIDIA_DRIVER_CAPABILITIES=all
#ENV NVIDIA_VISIBLE_DEVICES=0
#ENV CUDA_VISIBLE_DEVICES=0
ENV DEBIAN_FRONTEND=noninteractive
# Install system dependencies
RUN apt-get update && apt-get install -y \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-libav \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-ugly \
gstreamer1.0-pulseaudio \
gstreamer1.0-qt5 \
gstreamer1.0-tools \
gstreamer1.0-x \
libgstreamer-plugins-bad1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-dev \
libgtk2.0-0 \
libunwind-dev \
libvulkan1 \
libxcb-xkb1 \
libxcb1 \
libxcb-cursor0 \
python3-pip \
wget \
curl \
git \
nano \
iputils-ping \
net-tools \
fonts-inter &&\
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
#######################################
########## DOWNGRADE cuDNN ############
#######################################
# Remove existing cuDNN 8.9 for installing cuDNN 8.7
RUN apt-get update && apt-get remove -y --allow-change-held-packages libcudnn8 libcudnn8-dev
# Fügen Sie das NVIDIA-Paket-Repository hinzu
#RUN apt-get update && apt-get install -y wget gnupg && \
# wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb && \
# dpkg -i cuda-keyring_1.1-1_all.deb && \
# apt-get update
# Install cuDNN 8.7 for getting compatibility with tensorflow 2.14
#RUN apt-get install -y libcudnn8=8.7.0.*-1+cuda11.8 libcudnn8-dev=8.7.0.*-1+cuda11.8
# Install cuDNN 8.7 for getting compatibility with tensorflow 2.14
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/libcudnn8_8.7.0.84-1+cuda11.8_amd64.deb -O libcudnn8.deb && \
dpkg -i libcudnn8.deb && \
rm libcudnn8.deb
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/libcudnn8-dev_8.7.0.84-1+cuda11.8_amd64.deb -O libcudnn8-dev.deb && \
dpkg -i libcudnn8-dev.deb && \
rm libcudnn8-dev.deb
# Update dynamic linker run-time bindings
RUN ldconfig
# Erstelle die Symlinks für cuDNN-Bibliotheken
RUN ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.8 /usr/local/cuda/lib64/libcudnn.so.8 && \
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so.8.7.0 /usr/local/cuda/lib64/libcudnn.so.8.7.0 && \
ln -s /usr/lib/x86_64-linux-gnu/libcudnn.so /usr/local/cuda/lib64/libcudnn.so
#replace the wrong nvidia path with correct one
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64
ENV CUDA_HOME=/usr/local/cuda
#######################################
######### INSTALL TENSORRT ############
#######################################
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libnvinfer8=8.5.1-1+cuda11.8 \
libnvinfer-dev=8.5.1-1+cuda11.8 \
libnvinfer-plugin8=8.5.1-1+cuda11.8 \
libnvparsers8=8.5.1-1+cuda11.8 \
libnvparsers-dev=8.5.1-1+cuda11.8 \
libnvinfer-bin=8.5.1-1+cuda11.8 \
libnvonnxparsers8=8.5.1-1+cuda11.8 \
libnvonnxparsers-dev=8.5.1-1+cuda11.8 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*