Akegarasu / lora-scripts

LoRA & Dreambooth training scripts & GUI use kohya-ss's trainer, for diffusion model.
GNU Affero General Public License v3.0
4.43k stars 552 forks source link

无法安装 onnxruntime-gpu==1.17.1 #411

Closed CamelliasW closed 5 months ago

CamelliasW commented 5 months ago

Ubuntu系统18. 运行脚本 `bash ./run_gui.sh 15:25:32-385089 INFO Starting SD-Trainer Mikazuki GUI...
15:25:32-388811 INFO Base directory: /home/ubuntu/ai/lora-scripts, Working directory: /home/ubuntu/ai/lora-scripts
15:25:32-389733 INFO Linux Python 3.10.8 /home/ubuntu/anaconda3/envs/loenv/bin/python
15:25:32-393152 WARNING Package version not found: onnxruntime-gpu
15:25:32-393997 INFO uninstalling wrong onnxruntime version
Installing onnxruntime Found existing installation: onnxruntime 1.17.1 Uninstalling onnxruntime-1.17.1: Successfully uninstalled onnxruntime-1.17.1 Installing onnxruntime WARNING: Skipping onnxruntime-gpu as it is not installed. 15:25:33-406379 INFO installing onnxruntime
Installing onnxruntime Collecting onnxruntime==1.17.1 Using cached onnxruntime-1.17.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (4.3 kB) Requirement already satisfied: coloredlogs in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from onnxruntime==1.17.1) (15.0.1) Requirement already satisfied: flatbuffers in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from onnxruntime==1.17.1) (24.3.25) Requirement already satisfied: numpy>=1.21.6 in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from onnxruntime==1.17.1) (1.26.4) Requirement already satisfied: packaging in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from onnxruntime==1.17.1) (23.2) Requirement already satisfied: protobuf in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from onnxruntime==1.17.1) (5.26.1) Requirement already satisfied: sympy in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from onnxruntime==1.17.1) (1.12) Requirement already satisfied: humanfriendly>=9.1 in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from coloredlogs->onnxruntime==1.17.1) (10.0) Requirement already satisfied: mpmath>=0.19 in /home/ubuntu/anaconda3/envs/loenv/lib/python3.10/site-packages (from sympy->onnxruntime==1.17.1) (1.3.0) Using cached onnxruntime-1.17.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB) Installing collected packages: onnxruntime Successfully installed onnxruntime-1.17.1 Installing onnxruntime-gpu ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.17.1 (from versions: 1.12.0, 1.12.1, 1.13.1, 1.14.0, 1.14.1, 1.15.0, 1.15.1, 1.16.0, 1.16.1, 1.16.2, 1.16.3) ERROR: No matching distribution found for onnxruntime-gpu==1.17.1 Traceback (most recent call last): File "/home/ubuntu/ai/lora-scripts/gui.py", line 78, in launch() File "/home/ubuntu/ai/lora-scripts/gui.py", line 53, in launch prepare_environment() File "/home/ubuntu/ai/lora-scripts/mikazuki/launch_utils.py", line 247, in prepare_environment setup_onnxruntime() File "/home/ubuntu/ai/lora-scripts/mikazuki/launch_utils.py", line 207, in setup_onnxruntime run_pip(f"install onnxruntime-gpu=={onnx_version}", f"onnxruntime-gpu", live=True) File "/home/ubuntu/ai/lora-scripts/mikazuki/launch_utils.py", line 211, in run_pip return run(f'"{python_bin}" -m pip {command}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live) File "/home/ubuntu/ai/lora-scripts/mikazuki/launch_utils.py", line 74, in run raise RuntimeError(f"""{errdesc or 'Error running command'}. RuntimeError: Couldn't install onnxruntime-gpu. Command: "/home/ubuntu/anaconda3/envs/loenv/bin/python" -m pip install onnxruntime-gpu==1.17.1 Error code: 1

` 无法安装 onnxruntime-gpu==1.17.1

然后手动去找到源 https://pypi.org/project/onnxruntime-gpu Python 3.10 版本的需要 Python 3.10 manylinux: glibc 2.28+ x86-64

由于本机Ubuntu没有2.28+ ldd --version ldd (Ubuntu GLIBC 2.27-3ubuntu1.6) 2.27 Copyright (C) 2018 Free Software Foundation, Inc.

所以只能无法使用了吗

CamelliasW commented 5 months ago

目前不允许直接升级系统的 GLIBC ,有什么更好的办法吗

CamelliasW commented 5 months ago

目前不允许直接升级系统的 GLIBC ,有什么更好的办法吗

版本回退了

Akegarasu commented 5 months ago

--skip-prepare-environment