Skip to content

Commit

Permalink
Try TensorRT install
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepCowProductions committed Nov 15, 2023
1 parent 3f65ce9 commit b198a88
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 19 deletions.
41 changes: 41 additions & 0 deletions base-images/vscode/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ RUN echo LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" >> /etc/environment
ENV CPATH=$CONDA_DIR/include
RUN echo CPATH="${CPATH}" >> /etc/environment

#RUN dpkg -i nv-tensorrt-local-repo-${OS_RELEASE}-${NV_TENSOR_RT_TAG}_1.0-1_amd64.deb
# && cp /var/nv-tensorrt-local-repo-${OS_RELEASE}-${NV_TENSOR_RT_TAG}/*-keyring.gpg /usr/share/keyrings/
# && apt-get update
#
#RUN apt-get install tensorrt
# && apt-get install python3-libnvinfer-dev

LABEL ki.fh-swf.de.jupyterhub.namelabel="${BUILD_JUPYTER_VARIANT}-${BUILD_CUDA_VARIANT}"
LABEL ki.fh-swf.de.jupyterhub.description="Based on the original jupyterlab ${BUILD_JUPYTER_VARIANT}-notebook with ${BUILD_CUDA_VARIANT}."
LABEL org.opencontainers.image.description="Based on the original jupyterlab ${BUILD_JUPYTER_VARIANT}-notebook with ${BUILD_CUDA_VARIANT}."
Expand Down Expand Up @@ -186,6 +193,40 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
${NV_LIBNCCL_DEV_PACKAGE} \
&& rm -rf /var/lib/apt/lists/*


# Install TensorRT
ENV NV_TRT_VERSION 8.5.3
ENV NV_TENSOR_RT_TAG 8.5.3-1+cuda11.8
ENV OS_RELEASE ubuntu2204

# easy repo add
RUN apt-get update && apt-get install -y software-properties-common

## Theese might change unexpectedly
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
RUN mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/7fa2af80.pub
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 536F8F1DE80F6A35
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
RUN apt-get update

RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
RUN add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
RUN apt-get update

RUN apt-get install -y libcudnn8-dev=8.5.0.96-1+cuda11.7
RUN apt-get install -y libnvinfer8=${NV_TENSOR_RT_TAG} \
libnvinfer-plugin8=${NV_TENSOR_RT_TAG} \
libnvinfer-dev=${NV_TENSOR_RT_TAG} \
libnvinfer-plugin-dev=${NV_TENSOR_RT_TAG} \
libnvonnxparsers8=${NV_TENSOR_RT_TAG} \
libnvonnxparsers-dev=${NV_TENSOR_RT_TAG} \
libnvparsers8=${NV_TENSOR_RT_TAG} \
libnvparsers-dev=${NV_TENSOR_RT_TAG}
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Keep apt from auto upgrading the cublas and nccl packages. See https://gitlab.com/nvidia/container-images/cuda/-/issues/88
RUN apt-mark hold ${NV_LIBCUBLAS_DEV_PACKAGE_NAME} ${NV_LIBNCCL_DEV_PACKAGE_NAME}
ENV LIBRARY_PATH /usr/local/cuda/lib64/stubs
Expand Down
20 changes: 1 addition & 19 deletions images/deepml/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,25 +28,7 @@ RUN pip install multidict \
# RUN cp -P /usr/include/cudnn.h /usr/local/cuda/include
# RUN cp -P /usr/lib/x86_64-linux-gnu/libcudnn* /usr/local/cuda/lib64

# Install TensorRT
# our current configuration does not support any tensorrt version
# we have to upgrade cuda
#ENV TRT_VERSION 8.4.3.1-1+cuda11.6
#ENV LIBINFER_VERSION 8.4.3-1+cuda11.6
#RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# libnvinfer-plugin8=${LIBINFER_VERSION} \
# libnvonnxparsers8=${LIBINFER_VERSION} \
# libnvparsers8=${LIBINFER_VERSION} \
# libnvinfer-plugin-dev=${LIBINFER_VERSION} \
# libnvparsers-dev=${LIBINFER_VERSION} \
# libnvonnxparsers-dev=${LIBINFER_VERSION} \
# libcudnn8-dev=8.5.0.96-1+cuda11.7 \
# libnvinfer8=${LIBINFER_VERSION} \
# tensorrt-dev=${TRT_VERSION} \
# libnvinfer-dev=${LIBINFER_VERSION} \
# && apt-get clean && \
# rm -rf /var/lib/apt/lists/*
# Tensor RT is now in vscode base

USER $NB_UID

Expand Down

0 comments on commit b198a88

Please sign in to comment.