From d93db3b48655fb68690bbd1b4afd736e7e3cd736 Mon Sep 17 00:00:00 2001 From: Yilong Guo Date: Sun, 7 Jan 2024 21:40:30 +0800 Subject: [PATCH] Refine ipex setup (#5191) --- one_click.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/one_click.py b/one_click.py index f5adb80c..2bd31f72 100644 --- a/one_click.py +++ b/one_click.py @@ -233,7 +233,7 @@ def install_webui(): elif is_linux() and selected_gpu in ["APPLE", "NONE"]: install_pytorch += "--index-url https://download.pytorch.org/whl/cpu" elif selected_gpu == "INTEL": - install_pytorch += "intel_extension_for_pytorch==2.1.* --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/" + install_pytorch = "python -m pip install torch==2.1.0a0 torchvision==0.16.0a0 torchaudio==2.1.0a0 intel-extension-for-pytorch==2.1.10 --extra-index-url https://pytorch-extension.intel.com/release-whl/stable/xpu/us/" # Install Git and then Pytorch print_big_message("Installing PyTorch.") @@ -244,6 +244,13 @@ def install_webui(): print_big_message("Installing the CUDA runtime libraries.") run_cmd(f"conda install -y -c \"nvidia/label/{'cuda-12.1.1' if use_cuda118 == 'N' else 'cuda-11.8.0'}\" cuda-runtime", assert_success=True, environment=True) + if selected_gpu == "INTEL": + # Install oneAPI dependencies via conda + print_big_message("Installing Intel oneAPI runtime libraries.") + run_cmd(f"conda install -y -c intel dpcpp-cpp-rt=2024.0 mkl-dpcpp=2024.0") + # Install libuv required by Intel-patched torch + run_cmd(f"conda install -y libuv") + # Install the webui requirements update_requirements(initial_installation=True)