onnxruntime/tools/ci_build/github/linux/docker
Changming Sun 57dfd15d7b
Remove dnf update from docker build scripts (#17551)
### Description
1. Remove 'dnf update' from docker build scripts, because it upgrades TRT
packages from CUDA 11.x to CUDA 12.x.
To reproduce it, you can run the following commands in a CentOS CUDA
11.x docker image such as nvidia/cuda:11.8.0-cudnn8-devel-ubi8.
```
export v=8.6.1.6-1.cuda11.8
dnf  install -y libnvinfer8-${v} libnvparsers8-${v} libnvonnxparsers8-${v} libnvinfer-plugin8-${v} libnvinfer-vc-plugin8-${v}        libnvinfer-devel-${v} libnvparsers-devel-${v} libnvonnxparsers-devel-${v} libnvinfer-plugin-devel-${v} libnvinfer-vc-plugin-devel-${v} libnvinfer-headers-devel-${v}  libnvinfer-headers-plugin-devel-${v} 
dnf update -y
```
The last command will generate the following outputs:
```
========================================================================================================================
 Package                                     Architecture       Version                          Repository        Size
========================================================================================================================
Upgrading:
 libnvinfer-devel                            x86_64             8.6.1.6-1.cuda12.0               cuda             542 M
 libnvinfer-headers-devel                    x86_64             8.6.1.6-1.cuda12.0               cuda             118 k
 libnvinfer-headers-plugin-devel             x86_64             8.6.1.6-1.cuda12.0               cuda              14 k
 libnvinfer-plugin-devel                     x86_64             8.6.1.6-1.cuda12.0               cuda              13 M
 libnvinfer-plugin8                          x86_64             8.6.1.6-1.cuda12.0               cuda              13 M
 libnvinfer-vc-plugin-devel                  x86_64             8.6.1.6-1.cuda12.0               cuda             107 k
 libnvinfer-vc-plugin8                       x86_64             8.6.1.6-1.cuda12.0               cuda             251 k
 libnvinfer8                                 x86_64             8.6.1.6-1.cuda12.0               cuda             543 M
 libnvonnxparsers-devel                      x86_64             8.6.1.6-1.cuda12.0               cuda             467 k
 libnvonnxparsers8                           x86_64             8.6.1.6-1.cuda12.0               cuda             757 k
 libnvparsers-devel                          x86_64             8.6.1.6-1.cuda12.0               cuda             2.0 M
 libnvparsers8                               x86_64             8.6.1.6-1.cuda12.0               cuda             854 k
Installing dependencies:
 cuda-toolkit-12-0-config-common             noarch             12.0.146-1                       cuda             7.7 k
 cuda-toolkit-12-config-common               noarch             12.2.140-1                       cuda             7.9 k
 libcublas-12-0                              x86_64             12.0.2.224-1                     cuda             361 M
 libcublas-devel-12-0                        x86_64             12.0.2.224-1                     cuda             397 M

Transaction Summary
========================================================================================================================

```
As you can see from the output,  they are CUDA 12 packages. 

The problem can also be solved by lock the packages' versions by using
"dnf versionlock" command right after installing the CUDA/TRT packages.
However, going forward, to get the better reproducibility, I suggest
manually fix dnf package versions in the installation scripts like we do
for TRT now.

```bash
v="8.6.1.6-1.cuda11.8" &&\
    yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel8/x86_64/cuda-rhel8.repo &&\
    yum -y install libnvinfer8-${v} libnvparsers8-${v} libnvonnxparsers8-${v} libnvinfer-plugin8-${v} libnvinfer-vc-plugin8-${v}\
        libnvinfer-devel-${v} libnvparsers-devel-${v} libnvonnxparsers-devel-${v} libnvinfer-plugin-devel-${v} libnvinfer-vc-plugin-devel-${v} libnvinfer-headers-devel-${v}  libnvinfer-headers-plugin-devel-${v}
```
When we have a need to upgrade a package due to security alert or some
other reasons, we manually change the version string instead of relying
on "dnf update". Though this approach increases efforts, it can make our
pipeines more stable.

2. Move python test to docker
### Motivation and Context
Right now the nightly gpu package mixes using CUDA 11.x and CUDA 12.x
and the result package is totally not usable(crashes every time)
2023-09-21 07:33:29 -07:00
..
inference Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
scripts Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2_28_cpu Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2_28_cuda11 Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2_28_cuda11_6_tensorrt8_4 Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2_28_cuda11_6_tensorrt8_5 Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2_28_cuda11_8_tensorrt8_6 Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2_28_rocm [ROCm] add manylinux build test for ROCm CI (#17621) 2023-09-21 10:45:16 +08:00
Dockerfile.manylinux2_28_training_cuda11_8 Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.manylinux2014_aten_cpu
Dockerfile.manylinux2014_lort_cpu
Dockerfile.package_ubi8_cuda11_8_tensorrt8_6 Run Final_Jar_Testing_Linux_GPU in docker (#17533) 2023-09-15 08:35:55 -07:00
Dockerfile.package_ubuntu_cuda11_8_tensorrt8_6 Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
Dockerfile.ubuntu_cuda11_6_tensorrt8_4 Update cmake to 3.27 and upgrade Linux CUDA docker files from CentOS7 to UBI8 (#16856) 2023-09-05 18:12:10 -07:00
Dockerfile.ubuntu_cuda11_8_tensorrt8_5 Update cmake to 3.27 and upgrade Linux CUDA docker files from CentOS7 to UBI8 (#16856) 2023-09-05 18:12:10 -07:00
Dockerfile.ubuntu_cuda11_8_tensorrt8_6 Update cmake to 3.27 and upgrade Linux CUDA docker files from CentOS7 to UBI8 (#16856) 2023-09-05 18:12:10 -07:00
Dockerfile.ubuntu_gpu_training Add support for cuda 11.8 and python 3.11 for training (#15548) 2023-04-20 12:56:45 -07:00
Dockerfile.ubuntu_openvino Update cmake to 3.27 and upgrade Linux CUDA docker files from CentOS7 to UBI8 (#16856) 2023-09-05 18:12:10 -07:00
Dockerfile.ubuntu_tensorrt_bin Update cmake to 3.27 and upgrade Linux CUDA docker files from CentOS7 to UBI8 (#16856) 2023-09-05 18:12:10 -07:00
Dockerfile_manylinux2014_openvino_multipython Gradle clean up (#14973) 2023-03-10 10:50:32 -08:00
manylinux.patch Remove dnf update from docker build scripts (#17551) 2023-09-21 07:33:29 -07:00
migraphx-ci-pipeline-env.Dockerfile Update cmake to 3.27 and upgrade Linux CUDA docker files from CentOS7 to UBI8 (#16856) 2023-09-05 18:12:10 -07:00