Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] Docerfile.cuda docker image build error #21532

Closed
YWJWORLD opened this issue Jul 28, 2024 · 2 comments
Closed

[Build] Docerfile.cuda docker image build error #21532

YWJWORLD opened this issue Jul 28, 2024 · 2 comments
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider stale issues that have not been addressed in a while; categorized by a bot

Comments

@YWJWORLD
Copy link

Describe the issue

i got an error during build the dockerfile(Dockerfile.cuda)
There is no requirement.txt file in github

Urgency

No response

Target platform

Docker 24.0.2

Build script

--------------------------------------------------------------

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT License.

--------------------------------------------------------------

Dockerfile to run ONNXRuntime with CUDA, CUDNN integration

nVidia cuda 11.4 Base Image

FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
MAINTAINER Changming Sun "[email protected]"
ADD . /code

ENV PATH /usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
RUN apt-get update && apt-get install -y --no-install-recommends python3-dev ca-certificates g++ python3-numpy gcc make git python3-setuptools python3-wheel python3-packaging python3-pip aria2 && aria2c -q -d /tmp -o cmake-3.27.3-linux-x86_64.tar.gz https://github.com/Kitware/CMake/releases/download/v3.27.3/cmake-3.27.3-linux-x86_64.tar.gz && tar -zxf /tmp/cmake-3.27.3-linux-x86_64.tar.gz --strip=1 -C /usr

RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/scripts/requireme
nts.txt && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sync --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_cuda --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) 'CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;86'

FROM nvcr.io/nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04
ENV DEBIAN_FRONTEND=noninteractive
COPY --from=0 /code/build/Linux/Release/dist /root
COPY --from=0 /code/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends libstdc++6 ca-certificates python3-setuptools python3-wheel python3-pip unattended-upgrades && unattended-upgrade && python3 -m pip install /root/.whl && rm -rf /root/.whl

Error / output

=> ERROR [stage-0 4/4] RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/sc 0.8s

[stage-0 4/4] RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/scripts/requirements.txt && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sync --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --use_cuda --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) 'CMAKE_CUDA_ARCHITECTURES=52;60;61;70;75;86':
#0 0.746 ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/scripts/requirements.txt

Visual Studio Version

No response

GCC / Compiler Version

No response

@YWJWORLD YWJWORLD added the build build issues; typically submitted using template label Jul 28, 2024
@github-actions github-actions bot added the ep:CUDA issues related to the CUDA execution provider label Jul 28, 2024
@tianleiwu
Copy link
Contributor

tianleiwu commented Jul 31, 2024

Try replace tools/ci_build/github/linux/docker/inference/x86_64/python/cpu/scripts/requireme nts.txt by tools/ci_build/github/linux/docker/inference/x86_64/python/cuda/scripts/requirements.txt

@snnn, this docker file seems out of date since pipeline uses cudnn 9.

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Aug 30, 2024
tianleiwu added a commit that referenced this issue Sep 5, 2024
### Description
Previous image is based on cuda 12.1 and cudnn 8, which is out of date
since we have moved to cudnn 9 since 1.19 release.
(1) Upgrade base image to cuda 12.5.1 and cudnn 9.
(2) Update CMAKE_CUDA_ARCHITECTURES from 52;60;61;70;75;86 to
61;70;75;80;86;90 to support A100 and H100
(3) Make the build faster: exclude unit test; use ninja etc.
(4) upgrade some packages (like packaging etc) before building to avoid
build error.

### Motivation and Context
#21792
#21532
@snnn snnn closed this as completed Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

3 participants