diff --git a/installer.py b/installer.py index 72a6dd7f5..576949b47 100644 --- a/installer.py +++ b/installer.py @@ -447,7 +447,7 @@ def get_platform(): 'system': platform.system(), 'release': release, 'python': platform.python_version(), - 'docker': os.environ.get('SD_INSTALL_DEBUG', None) is not None, + 'docker': os.environ.get('SD_DOCKER', None) is not None, # 'host': platform.node(), # 'version': platform.version(), } @@ -455,6 +455,7 @@ def get_platform(): return { 'error': e } +# TODO Requires pydantic 2.x before fully supporting python 3.12 # check python version def check_python(supported_minors=[9, 10, 11, 12], reason=None): t_start = time.time() @@ -537,6 +538,7 @@ def install_rocm_zluda(): log.info('Using CPU-only torch') return os.environ.get('TORCH_COMMAND', 'torch torchvision') + # TODO Requires pydantic 2.x before fully supporting python 3.12 check_python(supported_minors=[10, 11], reason='ROCm or ZLUDA backends require Python 3.10 or 3.11') log.info('ROCm: AMD toolkit detected') os.environ.setdefault('PYTORCH_HIP_ALLOC_CONF', 'garbage_collection_threshold:0.8,max_split_size_mb:512') @@ -659,6 +661,9 @@ def install_rocm_zluda(): def install_ipex(torch_command): t_start = time.time() + # https://pytorch-extension.intel.com/installation?platform=gpu&version=v2.5.10%2Bxpu&os=linux%2Fwsl2&package=pip + # while IPEX supports 3.12, other components (such as pydantic 1.x) do not. Capping at 3.11 still. + # TODO Requires pydantic 2.x before fully supporting python 3.12 check_python(supported_minors=[9, 10, 11, 12], reason='IPEX backend requires Python 3.9, 3.10 or 3.11') args.use_ipex = True # pylint: disable=attribute-defined-outside-init log.info('IPEX: Intel OneAPI toolkit detected') @@ -681,7 +686,8 @@ def install_ipex(torch_command): os.environ.setdefault('IPEX_FORCE_ATTENTION_SLICE', '1') if "linux" in sys.platform: - torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.5.1+cxx11.abi torchvision==0.20.1+cxx11.abi intel-extension-for-pytorch==2.5.10+xpu oneccl_bind_pt==2.5.0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/cn/') + # default to US server. If The China server is needed, change .../release-whl/stable/xpu/us/ to .../release-whl/stable/xpu/cn/ + torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.5.1+cxx11.abi torchvision==0.20.1+cxx11.abi intel-extension-for-pytorch==2.5.10+xpu oneccl_bind_pt==2.5.0+xpu --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/') # os.environ.setdefault('TENSORFLOW_PACKAGE', 'tensorflow==2.15.1 intel-extension-for-tensorflow[xpu]==2.15.0.2') else: torch_command = os.environ.get('TORCH_COMMAND', 'torch==2.6.0+xpu torchvision==0.21.0+xpu --index-url https://download.pytorch.org/whl/test/xpu') @@ -695,6 +701,7 @@ def install_ipex(torch_command): def install_openvino(torch_command): t_start = time.time() + # TODO Requires pydantic 2.x before fully supporting python 3.12 check_python(supported_minors=[9, 10, 11, 12], reason='OpenVINO backend requires Python 3.9, 3.10 or 3.11') log.info('OpenVINO: selected') if sys.platform == 'darwin':