Skip to content

Commit

Permalink
add libjpeg-turbo to include dir for torchvision easyblock
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Moors committed May 7, 2024
1 parent ee54421 commit b72bfdc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion easybuild/easyblocks/t/torchvision.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from easybuild.easyblocks.generic.pythonpackage import PythonPackage, det_pylibdir
from easybuild.tools.build_log import EasyBuildError
from easybuild.tools.config import build_option
from easybuild.tools.modules import get_software_version
from easybuild.tools.modules import get_software_version, get_software_root
import easybuild.tools.environment as env


Expand Down Expand Up @@ -78,6 +78,11 @@ 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']:
vision_include = 'TORCHVISION_INCLUDE="$EBROOTLIBJPEGMINTURBO/include:$TORCHVISION_INCLUDE"'
self.cfg.update('preinstallopts', vision_include)

super(EB_torchvision, self).configure_step()

def sanity_check_step(self):
Expand Down

0 comments on commit b72bfdc

Please sign in to comment.