File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff 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 += """
297303RUN ./build.sh ${{COMMON_BUILD_ARGS}} --update --build {}
You can’t perform that action at this time.
0 commit comments