Skip to content

Commit

Permalink
use libjpeg_root
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Moors committed May 8, 2024
1 parent 8933187 commit 903e59c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions easybuild/easyblocks/t/torchvision.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ def configure_step(self):
if cuda_cc:
env.setvar('TORCH_CUDA_ARCH_LIST', ';'.join(cuda_cc))

libjpeg = get_software_root('libjpeg-turbo')
if libjpeg and 'TORCHVISION_INCLUDE' not in self.cfg['preinstallopts']:
env.setvar('TORCHVISION_INCLUDE', os.path.join(os.getenv('EBROOTLIBJPEGMINTURBO'), 'include'))
libjpeg_root = get_software_root('libjpeg-turbo')
if libjpeg_root and 'TORCHVISION_INCLUDE' not in self.cfg['preinstallopts']:
env.setvar('TORCHVISION_INCLUDE', os.path.join(libjpeg_root, 'include'))

super(EB_torchvision, self).configure_step()

Expand All @@ -109,7 +109,7 @@ def sanity_check_step(self):
}

if get_software_root('libjpeg-turbo'):
# check wither torchvision was built with libjpeg support
# check if torchvision was built with libjpeg support
# if not, will show error "RuntimeError: encode_jpeg: torchvision not compiled with libjpeg support"
python_code = '\n'.join([
"import torch, torchvision",
Expand Down

0 comments on commit 903e59c

Please sign in to comment.