Closed Well2333 closed 1 year ago
ERROR: Cannot activate python venv, aborting...
无法激活虚拟环境,只需要安装对应版本的venv就行,例如sudo apt-get install -y python3.10-venv
。
安装Intel的环境(oneApi)可以参考Intel官方。Download the Intel® oneAPI Base Toolkit,只需要安装oneAPI DPC++和 oneMKL。以下是我当时使用的代码。
sudo apt-get update
sudo apt-get install -y xdg-utils libatspi2.0-0 libgbm1 libgtk-3-0 libnotify4 libxcb-dri3-0 libnss3
sudo apt-get install -y gpg-agent wget
wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | \
sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg
echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | \
sudo tee /etc/apt/sources.list.d/intel.gpu.jammy.list
sudo apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/19079/l_BaseKit_p_2023.0.0.25537_offline.sh
sudo sh ./l_BaseKit_p_2023.0.0.25537_offline.sh
另外,每一次都要使用source /opt/intel/oneapi/setvars.sh
激活oneAPI,有一些错误可能是因为没有激活环境。
如果出现ERROR: Cannot add middleware after an application has started,是因为fastapi的版本问题,进入虚拟环境安装对应版本就行。
source ./venv/bin/activate
pip install fastapi==0.90.1
deactivate
希望对你的ARC之旅有所帮助。
ERROR: Cannot activate python venv, aborting...
无法激活虚拟环境,只需要安装对应版本的venv就行,例如sudo apt-get install -y python3.10-venv
。安装Intel的环境(oneApi)可以参考Intel官方。Download the Intel® oneAPI Base Toolkit,只需要安装oneAPI DPC++和 oneMKL。以下是我当时使用的代码。
sudo apt-get update sudo apt-get install -y xdg-utils libatspi2.0-0 libgbm1 libgtk-3-0 libnotify4 libxcb-dri3-0 libnss3 sudo apt-get install -y gpg-agent wget wget -qO - https://repositories.intel.com/graphics/intel-graphics.key | \ sudo gpg --dearmor --output /usr/share/keyrings/intel-graphics.gpg echo 'deb [arch=amd64,i386 signed-by=/usr/share/keyrings/intel-graphics.gpg] https://repositories.intel.com/graphics/ubuntu jammy arc' | \ sudo tee /etc/apt/sources.list.d/intel.gpu.jammy.list sudo apt-get install -y intel-opencl-icd intel-level-zero-gpu level-zero intel-media-va-driver-non-free libmfx1 wget https://registrationcenter-download.intel.com/akdlm/irc_nas/19079/l_BaseKit_p_2023.0.0.25537_offline.sh sudo sh ./l_BaseKit_p_2023.0.0.25537_offline.sh
另外,每一次都要使用
source /opt/intel/oneapi/setvars.sh
激活oneAPI,有一些错误可能是因为没有激活环境。如果出现ERROR: Cannot add middleware after an application has started,是因为fastapi的版本问题,进入虚拟环境安装对应版本就行。
source ./venv/bin/activate pip install fastapi==0.90.1 deactivate
希望对你的ARC之旅有所帮助。
上述的步骤我已经在提交issue之前就执行过了,但仍然出现了此结果。
sudo apt-get install -y python3.10-venv
命令安装之后,生成的虚拟环境并没有自带 activate 脚本。
另外,我确信 oneAPI 是激活状态,当时操作的终端我并没有关闭,查询记录能够发现是激活状态。
我把仍然留存的控制台记录全部放到了 pastebin 中,有效期是一个月,希望能够对发现问题有所帮助
今天我在尝试删除venv文件夹,并且把 python_cmd 由 python3 更换为 python3.10 之后,虚拟环境的问题便解决了,其中有两个值得注意的点:
然后,其中 level-zero 包在更换了 @OnTheWayes 大佬提供的镜像之后便顺利安装上了,也可能是我之前使用的是apt安装但实际上应该使用apt-get安装导致的。
最后一点是,在issue后半部分尝试手动安装依赖部分的尝试可以被忽略掉了,因为这些版本确实是存在于对应的特殊镜像上的,使用 webui.sh 脚本可以顺利获取到这些资源。
现在我已经成功搭建起来了环境,但是因为内存不足还没办法进行图像生成的测试(RuntimeError: An OpenCL error occurred: -6),准备加钱买内存条去了(悲)
请问你是否切换了wsl内核到5.17,我尝试切换内核,但是一直失败,目前查到可以通过.wslconfig修改位置,但是我无法编译出内核文件...
请问你是否切换了wsl内核到5.17,我尝试切换内核,但是一直失败,目前查到可以通过.wslconfig修改位置,但是我无法编译出内核文件...
这个我不太清楚了,我在安装完毕环境之后因为 RuntimeError: An OpenCL error occurred: -6
导致依旧无法使用,加钱把内存拓展到32G之后还是会这样,现在我在使用 drictml 版本,先对来说比ipex版本简单很多。
我现在 wsl 的内核版本为 GNU/Linux 5.15.90.1-microsoft-standard-WSL2 x86_64
我也是5.15 我是同时参考了b站的一篇文章 https://www.bilibili.com/read/cv22030278 比起readme中的做法多了一些步骤,... 我同时也使用novelai中文频道的包(drictml),速度大概在1.4it/s(300600),512512的话大概是1.1it/s,同时还不能生成一些大的图片和使用除了euler以外的采样方式..., 或者是cpu计算,功能基本都能用,性能差了亿点点... 还是希望可以使用oneApi吧,听说性能可以达到6it/s,同时限制没有那么多,我再研究研究,有好消息了告诉你
https://www.reddit.com/r/IntelArc/comments/11an12q/stable_diffusion_web_ui_for_intel_arc/?sort=new 按照这个教程,可以很方便的安装成功,执行之前记得重置你的linux系统, @Well2333
https://www.reddit.com/r/IntelArc/comments/11an12q/stable_diffusion_web_ui_for_intel_arc/?sort=new 按照这个教程,可以很方便的安装成功,执行之前记得重置你的linux系统, @Well2333
感谢,我现在也可以在wsl中成功使用oneapi进行绘图了,相比directml效率确实高很多,而且显存占用更低,但相对内存占用更高了,可能总计16G的内存会OOM吧(没测试过
我在绘图过程中内存占用最高能达到16G左右(32G系统内存),而且据说会存在内存泄漏的问题,不过总的来说还是好用的,更多的细节可以看文章下面的问答
我在绘图过程中内存占用最高能达到16G左右(32G系统内存),而且据说会存在内存泄漏的问题,不过总的来说还是好用的,更多的细节可以看文章下面的问答
是的,我也遇到了一些匪夷所思的问题,例如生成这样的图片
不过目前不清楚成因,再继续使用一段时间看看有无其他问题吧,如果实在有无法接受的问题,还是可以回到较为稳妥的directml方案。
Is there an existing issue for this?
What happened?
按照 教程 中的方法无法顺利安装环境
Steps to reproduce the problem
按照 教程 中的方法,进行到 设置 的第一步时,出现如下输出:
我查询 源码 后初步判断为环境初始化问题,也无法在对应目录下找到
activate
文件。(请不要在意多出来的文件,后面会有解释)然后,我为此虚拟环境的 python 安装了 pip 工具,但并未解决问题,依旧抛出上面的错误。
然后,我尝试按照 webui.sh 中的指令手动安装pytorch,但安装中发现这是cuda的版本,便手动中断安装了。
然后,我尝试按照 arcnote 中排查是否是环境问题导致的错误,在 这里 发现这个仓库可能出现了问题。
并且,无法获取 level-zero 包
然后,在后续根据 此处 尝试手动安装python依赖的时候,发现以下包并不存在
我手动修改了
torch==1.13.0
和intel_extension_for_pytorch==1.13.100
,但出现了版本冲突问题最终使用此命令成功安装
./venv/bin/python3.10 -m pip install pillow mkl torch==1.13.1 torchvision==0.14.1 intel_extension_for_pytorch==1.13.100 -f https://developer.intel.com/ipex-whl- stable-xpu-idp
但最后,在尝试验证gpu是否可用的时候,出现以下结果
截止到现在,我已经不知道改如何继续尝试debug了。
在上文中未作说明的部分,例如 教程 中设置往前的部分均未出现任何问题,与文中展示的完全一致,因此并未额外展示,如果有需要的信息我可以进行提供。
What should have happened?
None
Commit where the problem happens
main
What platforms do you use to access the UI ?
Windows
What browsers do you use to access the UI ?
Microsoft Edge
Command Line Arguments
List of extensions
None
Console logs
Additional information
宿主操作系统: Windows 10 22H2 WSL系统: Ubuntu-22.04 (wsl 2) python: 3.10.6(python-venv)
GPU: Arc A770 16G CPU: 5800x RAM: 16G DDR4 主板: MSI B550M MAG