mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-12-25 13:58:56 +01:00
Add IPEX option to the installer (experimental)
This commit is contained in:
parent
b5e1f12394
commit
0306b61bb0
13
one_click.py
13
one_click.py
@ -103,20 +103,21 @@ def install_webui():
|
|||||||
choice = os.environ["GPU_CHOICE"].upper()
|
choice = os.environ["GPU_CHOICE"].upper()
|
||||||
print_big_message(f"Selected GPU choice \"{choice}\" based on the GPU_CHOICE environment variable.")
|
print_big_message(f"Selected GPU choice \"{choice}\" based on the GPU_CHOICE environment variable.")
|
||||||
else:
|
else:
|
||||||
print("What is your GPU")
|
print("What is your GPU?")
|
||||||
print()
|
print()
|
||||||
print("A) NVIDIA")
|
print("A) NVIDIA")
|
||||||
print("B) AMD (Linux/MacOS only. Requires ROCm SDK 5.4.2/5.4.3 on Linux)")
|
print("B) AMD (Linux/MacOS only. Requires ROCm SDK 5.4.2/5.4.3 on Linux)")
|
||||||
print("C) Apple M Series")
|
print("C) Apple M Series")
|
||||||
print("D) None (I want to run models in CPU mode)")
|
print("D) Intel Arc (IPEX)")
|
||||||
|
print("E) None (I want to run models in CPU mode)")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
choice = input("Input> ").upper()
|
choice = input("Input> ").upper()
|
||||||
while choice not in ['A', 'B', 'C', 'D']:
|
while choice not in 'ABCDE':
|
||||||
print("Invalid choice. Please try again.")
|
print("Invalid choice. Please try again.")
|
||||||
choice = input("Input> ").upper()
|
choice = input("Input> ").upper()
|
||||||
|
|
||||||
if choice == "D":
|
if choice == "E":
|
||||||
print_big_message("Once the installation ends, make sure to open CMD_FLAGS.txt with\na text editor and add the --cpu flag.")
|
print_big_message("Once the installation ends, make sure to open CMD_FLAGS.txt with\na text editor and add the --cpu flag.")
|
||||||
|
|
||||||
# Find the proper Pytorch installation command
|
# Find the proper Pytorch installation command
|
||||||
@ -131,8 +132,10 @@ def install_webui():
|
|||||||
else:
|
else:
|
||||||
print("AMD GPUs are only supported on Linux. Exiting...")
|
print("AMD GPUs are only supported on Linux. Exiting...")
|
||||||
sys.exit()
|
sys.exit()
|
||||||
elif is_linux() and (choice == "C" or choice == "D"):
|
elif is_linux() and (choice == "C" or choice == "E"):
|
||||||
install_pytorch = "python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu"
|
install_pytorch = "python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu"
|
||||||
|
elif choice == "D":
|
||||||
|
install_pytorch = "python -m pip install torch==2.0.1a0 torchvision==0.15.2a0 intel_extension_for_pytorch==2.0.110+xpu -f https://developer.intel.com/ipex-whl-stable-xpu"
|
||||||
|
|
||||||
# Install Git and then Pytorch
|
# Install Git and then Pytorch
|
||||||
run_cmd(f"{install_git} && {install_pytorch}", assert_success=True, environment=True)
|
run_cmd(f"{install_git} && {install_pytorch}", assert_success=True, environment=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user