Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CUDA] Add CUDA_VERSION and CUDNN_VERSION etc. arguments to Dockerfil…
…e.cuda (microsoft#22351) ### Description * Add a few arguments CUDA_VERSION, CUDNN_VERSION, OS, GIT_COMMIT, GIT_BRANCH and ONNXRUNTIME_VERSION to the Dockerfile.cuda to allow for more flexibility in the build process. * Update README.md to include the new arguments and their usage. * Output labels to image so that it is easy to inspect the image. Available CUDA versions for ubuntu 24.04 can be found [here](https://hub.docker.com/r/nvidia/cuda/tags), and available CUDNN versions can be found [here](https://pypi.org/project/nvidia-cudnn-cu12/#history). Example command line to build docker image: ``` docker build -t onnxruntime-cuda --build-arg CUDA_VERSION=12.6.1 \ --build-arg CUDNN_VERSION=9.5.0.50 \ --build-arg GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) \ --build-arg GIT_COMMIT=$(git rev-parse HEAD) \ --build-arg ONNXRUNTIME_VERSION=$(cat ../VERSION_NUMBER) \ -f Dockerfile.cuda .. ``` Example labels from `docker inspect onnxruntime-cuda`: ``` "Labels": { "CUDA_VERSION": "12.6.1", "CUDNN_VERSION": "9.5.0.50", "maintainer": "Changming Sun <[email protected]>", "onnxruntime_git_branch": "main", "onnxruntime_git_commit": "bc84958dcef5c6017ae58085f55b669efd74f4a5", "onnxruntime_version": "1.20.0", "org.opencontainers.image.ref.name": "ubuntu", "org.opencontainers.image.version": "24.04" } ``` ### Motivation and Context microsoft#22339 has hard-coded the cuda and cudnn versions. User might want to choose specified cuda and cudnn version during building docker image.
- Loading branch information