mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-15 20:50:42 +00:00
### Description * Swap cuda version 11.8/12.2 in GPU CIs * Set CUDA12 as default version in yamls of publishing nuget/python/java GPU packages * Suppress warnings as errors of flash_api.cc during ort win-build
46 lines
No EOL
1.7 KiB
Text
46 lines
No EOL
1.7 KiB
Text
# The default ARGs are for cuda 11.8 with cudnn8, TensorRT is optional
|
|
# Please overwrite BASEIMAGE, TRT_VERSION and other arguments with
|
|
# --docker-build-args ' --build-arg BASEIMAGE=other_base_image --build-arg TRT_VERSION=other_trt_version etc...'
|
|
# for other cuda version and TRT version
|
|
ARG BASEIMAGE=nvidia/cuda:12.5.1-cudnn-devel-ubi8
|
|
|
|
FROM $BASEIMAGE
|
|
ARG TRT_VERSION
|
|
|
|
#Install TensorRT only if TRT_VERSION is not empty
|
|
RUN if [ -n "$TRT_VERSION" ]; then \
|
|
echo "TRT_VERSION is $TRT_VERSION" && \
|
|
dnf -y install \
|
|
libnvinfer10-${TRT_VERSION} \
|
|
libnvinfer-headers-devel-${TRT_VERSION} \
|
|
libnvinfer-devel-${TRT_VERSION} \
|
|
libnvinfer-lean10-${TRT_VERSION} \
|
|
libnvonnxparsers10-${TRT_VERSION} \
|
|
libnvonnxparsers-devel-${TRT_VERSION} \
|
|
libnvinfer-dispatch10-${TRT_VERSION} \
|
|
libnvinfer-plugin10-${TRT_VERSION} \
|
|
libnvinfer-vc-plugin10-${TRT_VERSION} \
|
|
libnvinfer-bin-${TRT_VERSION} \
|
|
libnvinfer-plugin10-${TRT_VERSION} \
|
|
libnvinfer-plugin-devel-${TRT_VERSION} \
|
|
libnvinfer-vc-plugin-devel-${TRT_VERSION} \
|
|
libnvinfer-lean-devel-${TRT_VERSION} \
|
|
libnvinfer-dispatch-devel-${TRT_VERSION} \
|
|
libnvinfer-headers-plugin-devel-${TRT_VERSION} && \
|
|
dnf clean dbcache ; \
|
|
else \
|
|
echo "TRT_VERSION is none skipping Tensor RT Installation" ; \
|
|
fi
|
|
|
|
ENV JAVA_HOME=/usr/lib/jvm/msopenjdk-11
|
|
#Add our own dependencies
|
|
ADD scripts /tmp/scripts
|
|
RUN cd /tmp/scripts && /tmp/scripts/manylinux/install_centos.sh && /tmp/scripts/manylinux/install_deps.sh && rm -rf /tmp/scripts
|
|
|
|
ARG BUILD_UID=1001
|
|
ARG BUILD_USER=onnxruntimedev
|
|
RUN adduser --uid $BUILD_UID $BUILD_USER
|
|
WORKDIR /home/$BUILD_USER
|
|
USER $BUILD_USER
|
|
ENV PATH /usr/local/dotnet:$PATH
|
|
ENV CUDA_MODULE_LOADING "LAZY" |