Skip to content

Commit 9cf0c01

Browse files
committed
Update cudnn home
1 parent 8f8ea27 commit 9cf0c01

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

tools/gen_ort_dockerfile.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,6 @@ def dockerfile_for_linux(output_file):
259259
ep_flags += ' --cuda_version "{}"'.format(FLAGS.cuda_version)
260260
if FLAGS.cuda_home is not None:
261261
ep_flags += ' --cuda_home "{}"'.format(FLAGS.cuda_home)
262-
if FLAGS.cudnn_home is not None:
263-
ep_flags += ' --cudnn_home "{}"'.format(FLAGS.cudnn_home)
264-
elif target_platform() == "igpu":
265-
ep_flags += ' --cudnn_home "/usr/lib/aarch64-linux-gnu"'
266262
if FLAGS.ort_tensorrt:
267263
ep_flags += " --use_tensorrt"
268264
if FLAGS.ort_version >= "1.12.1":
@@ -292,6 +288,16 @@ def dockerfile_for_linux(output_file):
292288
""".format(
293289
cuda_archs
294290
)
291+
if FLAGS.enable_gpu : #and target_platform() != "igpu"
292+
# For GPU build, include the cudnn_home flag
293+
df += """
294+
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
295+
""".format(ep_flags)
296+
else:
297+
# For non-GPU
298+
df += """
299+
RUN ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {}
300+
""".format(ep_flags)
295301

296302
df += """
297303
RUN ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {}

0 commit comments

Comments
 (0)