aarch64 arm64 部署 stable diffusion webui 笔记 【1】准备 venv 安装pytorch 验证cuda

aarch64 pytorch(没有aarch64对应版本,自行编译)

pytorch-v2.0.1 cuda arm64 aarch64 torch 2.0.1+cu118 源码编译笔记【2】验证cuda安装 成功_hkNaruto的博客-CSDN博客

创建venv

[root@ceph3 stable-diffusion-webui]# /usr/local/Python-3.10.12/bin/python3 -m venv venv

[root@ceph3 stable-diffusion-webui]# source venv/bin/activate
(venv)[root@ceph3 stable-diffusion-webui]# python3
Python 3.10.12 (main, Sep  4 2023, 10:01:29) [GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'torch'
>>> 

发现torch未安装到venv,

安装pyyaml

(venv) [root@ceph3 stable-diffusion-webui]# cd /home/yeqiang/pyyaml-6.0.1/
(venv) [root@ceph3 pyyaml-6.0.1]# python3 setup.py install
日志

(venv) [root@ceph3 pyyaml-6.0.1]# python3 setup.py install
running install
/home/yeqiang/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.warnings.warn(
/home/yeqiang/stable-diffusion-webui/venv/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.warnings.warn(
running bdist_egg
running egg_info
writing lib/PyYAML.egg-info/PKG-INFO
writing dependency_links to lib/PyYAML.egg-info/dependency_links.txt
writing top-level names to lib/PyYAML.egg-info/top_level.txt
reading manifest file 'lib/PyYAML.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README'
adding license file 'LICENSE'
writing manifest file 'lib/PyYAML.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-aarch64/egg
running install_lib
running build_py
running build_ext
building 'yaml._yaml' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/yeqiang/stable-diffusion-webui/venv/include -I/usr/local/Python-3.10.12/include/python3.10 -c yaml/_yaml.c -o build/temp.linux-aarch64-cpython-310/yaml/_yaml.o
gcc: 错误:yaml/_yaml.c:没有那个文件或目录
gcc: 致命错误:没有输入文件
编译中断。
Error compiling module, falling back to pure Python
creating build/bdist.linux-aarch64/egg
creating build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/__init__.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/composer.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/constructor.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/cyaml.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/dumper.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/emitter.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/error.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/events.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/loader.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/nodes.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/parser.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/reader.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/representer.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/resolver.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/scanner.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/serializer.py -> build/bdist.linux-aarch64/egg/yaml
copying build/lib.linux-aarch64-cpython-310/yaml/tokens.py -> build/bdist.linux-aarch64/egg/yaml
creating build/bdist.linux-aarch64/egg/_yaml
copying build/lib.linux-aarch64-cpython-310/_yaml/__init__.py -> build/bdist.linux-aarch64/egg/_yaml
byte-compiling build/bdist.linux-aarch64/egg/yaml/__init__.py to __init__.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/composer.py to composer.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/constructor.py to constructor.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/cyaml.py to cyaml.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/dumper.py to dumper.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/emitter.py to emitter.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/error.py to error.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/events.py to events.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/loader.py to loader.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/nodes.py to nodes.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/parser.py to parser.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/reader.py to reader.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/representer.py to representer.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/resolver.py to resolver.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/scanner.py to scanner.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/serializer.py to serializer.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/yaml/tokens.py to tokens.cpython-310.pyc
byte-compiling build/bdist.linux-aarch64/egg/_yaml/__init__.py to __init__.cpython-310.pyc
creating build/bdist.linux-aarch64/egg/EGG-INFO
copying lib/PyYAML.egg-info/PKG-INFO -> build/bdist.linux-aarch64/egg/EGG-INFO
copying lib/PyYAML.egg-info/SOURCES.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying lib/PyYAML.egg-info/dependency_links.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
copying lib/PyYAML.egg-info/top_level.txt -> build/bdist.linux-aarch64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/PyYAML-6.0.1-py3.10-linux-aarch64.egg' and adding 'build/bdist.linux-aarch64/egg' to it
removing 'build/bdist.linux-aarch64/egg' (and everything under it)
Processing PyYAML-6.0.1-py3.10-linux-aarch64.egg
Copying PyYAML-6.0.1-py3.10-linux-aarch64.egg to /home/yeqiang/stable-diffusion-webui/venv/lib/python3.10/site-packages
Adding PyYAML 6.0.1 to easy-install.pth fileInstalled /home/yeqiang/stable-diffusion-webui/venv/lib/python3.10/site-packages/PyYAML-6.0.1-py3.10-linux-aarch64.egg
Processing dependencies for PyYAML==6.0.1
Finished processing dependencies for PyYAML==6.0.1

安装typing_extensions

(venv) [root@ceph3 yeqiang]# python3 -m pip install /home/yeqiang/typing_extensions-4.7.1-py3-none-any.whl 
Processing ./typing_extensions-4.7.1-py3-none-any.whl
Installing collected packages: typing-extensions
Successfully installed typing-extensions-4.7.1
 

venv内安装编译好的pytorch

(venv) [root@ceph3 ~]# cd /home/yeqiang/pytorch
(venv) [root@ceph3 pytorch]# export PATH=/usr/local/cmake-3.27.4-linux-aarch64/bin:$PATH
(venv) [root@ceph3 pytorch]# python3 setup.py install
当前成果

pip list显示torch未2.0.0a0,实际上是在v2.0.1分支上编译的。

安装import torch需要的依赖

(venv) [root@ceph3 stable-diffusion-webui]# cd /home/yeqiang/pytorch-libs/
(venv) [root@ceph3 pytorch-libs]# python3 -m pip install *.whl
Processing ./filelock-3.12.3-py3-none-any.whl
Processing ./Jinja2-3.1.2-py3-none-any.whl
Processing ./MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Processing ./mpmath-1.3.0-py3-none-any.whl
Processing ./networkx-3.1-py3-none-any.whl
Processing ./sympy-1.12-py3-none-any.whl
Requirement already satisfied: typing-extensions>=4.7.1 in /home/yeqiang/stable-diffusion-webui/venv/lib/python3.10/site-packages (from filelock==3.12.3) (4.7.1)
Installing collected packages: mpmath, sympy, networkx, MarkupSafe, filelock, Jinja2
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.3 filelock-3.12.3 mpmath-1.3.0 networkx-3.1 sympy-1.12

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
 

验证venv内的torch+cuda

其他依赖安装待续。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/103717.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Python 03(循环语句)

Python03&#xff08;循环语句&#xff09; 文章目录 Python03&#xff08;循环语句&#xff09;一、while语句二、while实现猜数字三、while循环的嵌套while循环嵌套实例需求&#xff1a; 四、for循环1、什么 是for循环2、语法3、执行流程4、for循环的基本使用5、range()函数6…

【Python】Python运算符/部分函数对应的双下划线魔法方法

先说下Python版本&#xff1a;【Python 3.7.8】 以下用图片表格展示&#xff0c;一是防扒&#xff0c;二是没精力改成md格式。 还有就是内容肯定没有完全包含(而且也很难做到)&#xff0c;像是__reduce__与py自带模块pickle有关(pickle用于对象序列化/反序列化)、sys.getsizeo…

武汉凯迪正大—直读激光盐密灰密测试仪

一、凯迪正大—绝缘子灰密盐密测试仪产品概述 凯迪正大绝缘子灰密盐密测试仪采用的检测技术将灰密测试与盐密测试合二为一&#xff0c;可同时检测出被测绝缘子的灰密度和盐密度&#xff0c;简化了绝缘子污秽检测的流程&#xff0c;适合在巡检现场和实验室使用。 二、凯迪正大…

OpenCV(三十一):形态学操作

​​​​​​1.形态学操作 OpenCV 提供了丰富的函数来进行形态学操作&#xff0c;包括腐蚀、膨胀、开运算、闭运算等。下面介绍一些常用的 OpenCV 形态学操作函数&#xff1a; 腐蚀操作&#xff08;Erosion&#xff09;&#xff1a; erode(src, dst, kernel, anchor, iteration…

关于 Unity 连接 MuMu 模拟器上的 Unity Remote 5 的方法

在使用 Unity 开发 Android 的过程中&#xff0c;可以通过使用 Unity Remote 这个 app 来和真机连接&#xff0c;进而在真实环境下进行测试性能等工作&#xff0c;而本次则是由于其他问题引出的一个小坑&#xff0c;记录以备后续查询。 这次是由于在自学过程中遇到的一个工程&…

go-zero jwt 鉴权快速实战

前面我们分享了 go-zero 的快速实战以及日志组件的剖析&#xff0c;本次我们来实战使用 go-zero jwt 鉴权 本次文章主要是分享关于 go-zero 中 jwt 的使用方式&#xff0c;会以一个 demo 的方式来进行实战&#xff0c;对于使用 goctl 工具以及安装细节就不在赘述&#xff0c;有…

手写Spring:第18章-数据类型转换工厂设计实现

文章目录 一、目标&#xff1a;数据类型转换工厂二、设计&#xff1a;数据类型转换工厂三、实现&#xff1a;数据类型转换工厂3.1 工程结构3.2 数据类型转换工厂类图3.3 定义类型转换接口3.3.1 类型转换处理接口3.3.2 类型转换工厂3.3.3 通用类型转换接口3.3.4 类型转换注册接口…

云原生Kubernetes:二进制部署K8S单Master架构(二)

目录 一、理论 1.K8S单Master架构 2.部署 master 组件 3.部署 Woker Node 组件 4.在master1节点上操作 5.在 node01 节点上操作 6.在 master01 节点上操作 7.在 node01 节点上操作 8.node02 节点部署&#xff08;方法一&#xff09; 二、实验 1.环境 2.部署 master …

算法训练day36|贪心算法 part05(重叠区间三连击:LeetCode435. 无重叠区间763.划分字母区间56. 合并区间)

文章目录 435. 无重叠区间思路分析 763.划分字母区间思路分析代码实现思考总结 56. 合并区间思路分析 435. 无重叠区间 题目链接&#x1f525;&#x1f525; 给定一个区间的集合&#xff0c;找到需要移除区间的最小数量&#xff0c;使剩余区间互不重叠。 注意: 可以认为区间的…

【C++心愿便利店】No.5---构造函数和析构函数

文章目录 前言一、类的6个默认成员函数二、构造函数三、析构函数 前言 &#x1f467;个人主页&#xff1a;小沈YO. &#x1f61a;小编介绍&#xff1a;欢迎来到我的乱七八糟小星球&#x1f31d; &#x1f4cb;专栏&#xff1a;C 心愿便利店 &#x1f511;本章内容&#xff1a;类…

什么是JVM常用调优策略?分别有哪些?

目录 一、JVM调优 二、堆内存大小调整 三、垃圾回收器调优 四、线程池调优 一、JVM调优 Java虚拟机&#xff08;JVM&#xff09;的调优主要是为了提高应用程序的性能&#xff0c;包括提高应用程序的响应速度和吞吐量。以下是一些常用的JVM调优策略&#xff1a; 堆内存大小…

bboss 流批一体化框架 与 数据采集 ETL

数据采集 ETL 与 流批一体化框架 特性&#xff1a; 高效、稳定、快速、安全 bboss 是一个基于开源协议 Apache License 发布的开源项目&#xff0c;主要由以下三部分构成&#xff1a; Elasticsearch Highlevel Java Restclient &#xff0c; 一个高性能高兼容性的Elasticsea…