Skip to content
Merged
Changes from all 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
28 changes: 25 additions & 3 deletions tools/gen_ort_dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def dockerfile_for_linux(output_file):
df += """
# Install OpenVINO
ARG ONNXRUNTIME_OPENVINO_VERSION
ENV INTEL_OPENVINO_DIR /opt/intel/openvino_${ONNXRUNTIME_OPENVINO_VERSION}
ENV INTEL_OPENVINO_DIR=/opt/intel/openvino_${ONNXRUNTIME_OPENVINO_VERSION}
"""
df += """
ARG OPENVINO_SHORT_VERSION={}
Expand Down Expand Up @@ -322,9 +322,31 @@ def dockerfile_for_linux(output_file):
ep_flags += (
" --skip_tests --cmake_extra_defines 'onnxruntime_BUILD_UNIT_TESTS=OFF'"
)
cuda_archs = "87;101"
if os.getenv("CUDA_ARCH_LIST") is not None:
print(f"[INFO] Defined CUDA_ARCH_LIST: {os.getenv('CUDA_ARCH_LIST')}")
cuda_archs = (
os.getenv("CUDA_ARCH_LIST")
.replace("PTX", "")
.replace(" ", "-real;")
.replace(".", "")
)
cuda_archs = re.sub(r"-real;$", "", cuda_archs)
print(f"[INFO] Set ONNX Runtime to use CUDA architectures to: {cuda_archs}")
else:
cuda_archs = "87"
else:
cuda_archs = "75;80;86;89;90;100;120"
if os.getenv("CUDA_ARCH_LIST") is not None:
print(f"[INFO] Defined CUDA_ARCH_LIST: {os.getenv('CUDA_ARCH_LIST')}")
cuda_archs = (
os.getenv("CUDA_ARCH_LIST")
.replace("PTX", "")
.replace(" ", "-real;")
.replace(".", "")
)
cuda_archs = re.sub(r"-real;$", "", cuda_archs)
print(f"[INFO] Set ONNX Runtime to use CUDA architectures to: {cuda_archs}")
else:
cuda_archs = "75;80;86;90;100;120"

df += """
WORKDIR /workspace/onnxruntime
Expand Down
Loading