@@ -5,13 +5,6 @@ ARG CUDNN_CUDA_VERSION_MAJ_MIN
5
5
ARG CUDNN_CUDA_VERSION_MAJ_MIN_AMD64=${CUDNN_CUDA_VERSION_MAJ_MIN}
6
6
ARG CUDNN_CUDA_VERSION_MAJ_MIN_ARM64=${CUDNN_CUDA_VERSION_MAJ_MIN}
7
7
8
- ARG LIBNVINFER_VERSION
9
- ARG LIBNVINFER_VERSION_AMD64=${LIBNVINFER_VERSION}
10
- ARG LIBNVINFER_VERSION_ARM64=${LIBNVINFER_VERSION}
11
- ARG LIBNVINFER_CUDA_VERSION_MAJ_MIN
12
- ARG LIBNVINFER_CUDA_VERSION_MAJ_MIN_AMD64=${LIBNVINFER_CUDA_VERSION_MAJ_MIN}
13
- ARG LIBNVINFER_CUDA_VERSION_MAJ_MIN_ARM64=${LIBNVINFER_CUDA_VERSION_MAJ_MIN}
14
-
15
8
ARG BUILD_ON_IMAGE
16
9
ARG CUDNN_VERSION_MAJ=${CUDNN_VERSION%%.*}
17
10
ARG CUDNN_VERSION_MAJ=${CUDNN_VERSION_MAJ:-${CUDNN_VERSION_AMD64%%.*}}
@@ -130,11 +123,6 @@ FROM cudnn${CUDNN_VERSION_MAJ}-${CUDA_IMAGE_FLAVOR}-${TARGETARCH}
130
123
131
124
ARG DEBIAN_FRONTEND=noninteractive
132
125
133
- ARG LIBNVINFER_VERSION_AMD64
134
- ARG LIBNVINFER_VERSION_ARM64
135
- ARG LIBNVINFER_CUDA_VERSION_MAJ_MIN_AMD64
136
- ARG LIBNVINFER_CUDA_VERSION_MAJ_MIN_ARM64
137
-
138
126
ARG CUDA_HOME=/usr/local/cuda
139
127
ARG NVBLAS_CONFIG_FILE=/etc/nvblas.conf
140
128
@@ -181,60 +169,5 @@ RUN cpuBlasLib="$(update-alternatives --query \
181
169
&& apt-mark hold \
182
170
${NV_CUDNN_PACKAGE_NAME} \
183
171
${NV_CUDNN_DEV_PACKAGE_NAME} \
184
- # # Install TensorRT
185
- && case "$dpkgArch" in \
186
- amd64) LIBNVINFER_VERSION=$LIBNVINFER_VERSION_AMD64 LIBNVINFER_CUDA_VERSION_MAJ_MIN=$LIBNVINFER_CUDA_VERSION_MAJ_MIN_AMD64 ;; \
187
- arm64) LIBNVINFER_VERSION=$LIBNVINFER_VERSION_ARM64 LIBNVINFER_CUDA_VERSION_MAJ_MIN=$LIBNVINFER_CUDA_VERSION_MAJ_MIN_ARM64 ;; \
188
- *) echo "error: Architecture $dpkgArch unsupported" ; exit 1 ;; \
189
- esac \
190
- # # Install development libraries and headers
191
- # # if devel-flavor of CUDA image is used
192
- && if [ ${CUDA_IMAGE_FLAVOR} = "devel" ]; then \
193
- dev="-dev" ; \
194
- if dpkg --compare-versions ${LIBNVINFER_VERSION} gt "8.6" ; then \
195
- headers="-headers" ; \
196
- fi; \
197
- fi \
198
- && LIBNVINFER_VERSION_MAJ=${LIBNVINFER_VERSION%%.*} \
199
- && CUDA_VERSION_MAJ_MIN=${LIBNVINFER_CUDA_VERSION_MAJ_MIN:-${CUDA_VERSION%.*}} \
200
- && apt-get -y install --no-install-recommends \
201
- libnvinfer${LIBNVINFER_VERSION_MAJ}=${LIBNVINFER_VERSION}-1+cuda${CUDA_VERSION_MAJ_MIN} \
202
- libnvinfer${dev:-${LIBNVINFER_VERSION_MAJ}}=${LIBNVINFER_VERSION}-1+cuda${CUDA_VERSION_MAJ_MIN} \
203
- libnvinfer${headers}${dev:-${LIBNVINFER_VERSION_MAJ}}=${LIBNVINFER_VERSION}-1+cuda${CUDA_VERSION_MAJ_MIN} \
204
- libnvinfer-plugin${LIBNVINFER_VERSION_MAJ}=${LIBNVINFER_VERSION}-1+cuda${CUDA_VERSION_MAJ_MIN} \
205
- libnvinfer-plugin${dev:-${LIBNVINFER_VERSION_MAJ}}=${LIBNVINFER_VERSION}-1+cuda${CUDA_VERSION_MAJ_MIN} \
206
- libnvinfer${headers}-plugin${dev:-${LIBNVINFER_VERSION_MAJ}}=${LIBNVINFER_VERSION}-1+cuda${CUDA_VERSION_MAJ_MIN} \
207
- # # Keep apt from auto upgrading the libnvinfer packages
208
- && apt-mark hold \
209
- libnvinfer${LIBNVINFER_VERSION_MAJ} \
210
- libnvinfer${dev:-${LIBNVINFER_VERSION_MAJ}} \
211
- libnvinfer${headers}${dev:-${LIBNVINFER_VERSION_MAJ}} \
212
- libnvinfer-plugin${LIBNVINFER_VERSION_MAJ} \
213
- libnvinfer-plugin${dev:-${LIBNVINFER_VERSION_MAJ}} \
214
- libnvinfer${headers}-plugin${dev:-${LIBNVINFER_VERSION_MAJ}} \
215
- # # Create symlink when only newer TensorRT libraries are available
216
- && trtRunLib=$(ls -d /usr/lib/$(uname -m)-linux-gnu/* | \
217
- grep 'libnvinfer.so.[0-9]\+ $' ) \
218
- && trtPluLib=$(ls -d /usr/lib/$(uname -m)-linux-gnu/* | \
219
- grep 'libnvinfer_plugin.so.[0-9]\+ $' ) \
220
- && if [ "$(echo $trtRunLib | sed -n 's/.*.so.\( [0-9]\+\) /\1 /p')" -gt "8" ]; then \
221
- # # TensorFlow versions < 2.18 expect TensorRT libraries version 8.6.1/8.6.2
222
- if [ "$dpkgArch" = "amd64" ]; then \
223
- ln -rs $trtRunLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer.so.8.6.1; \
224
- ln -rs $trtPluLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer_plugin.so.8.6.1; \
225
- fi; \
226
- if [ "$dpkgArch" = "arm64" ]; then \
227
- ln -rs $trtRunLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer.so.8.6.2; \
228
- ln -rs $trtPluLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer_plugin.so.8.6.2; \
229
- fi; \
230
- # # TensorFlow versions < 2.15 expect TensorRT libraries version 8
231
- ln -rs $trtRunLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer.so.8; \
232
- ln -rs $trtPluLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer_plugin.so.8; \
233
- fi \
234
- && if [ "$(echo $trtRunLib | sed -n 's/.*.so.\( [0-9]\+\) /\1 /p')" -gt "7" ]; then \
235
- # # TensorFlow versions < 2.12 expect TensorRT libraries version 7
236
- ln -rs $trtRunLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer.so.7; \
237
- ln -rs $trtPluLib /usr/lib/$(uname -m)-linux-gnu/libnvinfer_plugin.so.7; \
238
- fi \
239
172
# # Clean up
240
173
&& rm -rf /var/lib/apt/lists/*
0 commit comments