Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions tools/gen_ort_dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,6 @@ def dockerfile_for_linux(output_file):
ep_flags += ' --cuda_version "{}"'.format(FLAGS.cuda_version)
if FLAGS.cuda_home is not None:
ep_flags += ' --cuda_home "{}"'.format(FLAGS.cuda_home)
if FLAGS.cudnn_home is not None:
ep_flags += ' --cudnn_home "{}"'.format(FLAGS.cudnn_home)
elif target_platform() == "igpu":
ep_flags += ' --cudnn_home "/usr/lib/aarch64-linux-gnu"'
if FLAGS.ort_tensorrt:
ep_flags += " --use_tensorrt"
if FLAGS.ort_version >= "1.12.1":
Expand All @@ -283,7 +279,7 @@ def dockerfile_for_linux(output_file):
)
cuda_archs = "53;62;72;87"
else:
cuda_archs = "75;80;86;90"
cuda_archs = "75;80;86;90;100;120"

df += """
WORKDIR /workspace/onnxruntime
Expand All @@ -292,6 +288,16 @@ def dockerfile_for_linux(output_file):
""".format(
cuda_archs
)
if FLAGS.enable_gpu : #and target_platform() != "igpu"
# For GPU build, include the cudnn_home flag
df += """
RUN _CUDNN_VERSION=$(echo $CUDNN_VERSION | cut -d. -f1-2) && ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {} --cudnn_home /usr/local/cudnn-$_CUDNN_VERSION/cuda
""".format(ep_flags)
else:
# For non-GPU
df += """
RUN ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {}
""".format(ep_flags)

df += """
RUN ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {}
Expand Down Expand Up @@ -478,7 +484,7 @@ def dockerfile_for_windows(output_file):
WORKDIR /workspace/onnxruntime
ARG VS_DEVCMD_BAT="\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
RUN powershell Set-Content 'build.bat' -value 'call %VS_DEVCMD_BAT%',(Get-Content 'build.bat')
RUN build.bat --cmake_generator "Visual Studio 17 2022" --config Release --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=75;80;86;90" --skip_submodule_sync --parallel --build_shared_lib --compile_no_warning_as_error --skip_tests --update --build --build_dir /workspace/build {}
RUN build.bat --cmake_generator "Visual Studio 17 2022" --config Release --cmake_extra_defines "CMAKE_CUDA_ARCHITECTURES=75;80;86;90;100;120" --skip_submodule_sync --parallel --build_shared_lib --compile_no_warning_as_error --skip_tests --update --build --build_dir /workspace/build {}
""".format(
ep_flags
)
Expand Down
Loading