"doc/vscode:/vscode.git/clone" did not exist on "523d2ce08dbbf48bec90eec0050b660a5ade262c"
Commit 53c5b073 authored by shantf's avatar shantf
Browse files

update README.md and ui/utils.py

parent 105c798e
......@@ -22,8 +22,8 @@ stable diffusion 对文本进行处理并进行编码生成文本向量,对初
### Docker(方法一)
此处提供[光源](https://www.sourcefind.cn/#/service-details)拉取docker镜像的地址与使用步骤
```
docker pull image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.4.2-centos7.6-dtk-23.04-py39-latest
docker run --shm-size 16g --network=host --name=image_generate_paddle --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/imagegenerate_paddle:/home/imagegenerate_paddle -it <Your Image ID> bash
docker pull image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.5.2-ubuntu20.04-dtk24.04.1-py3.10
docker run --shm-size 16g --network=host --name=image_generate_paddle --privileged --device=/dev/kfd --device=/dev/dri --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v $PWD/imagegenerate_paddle:/home/imagegenerate_paddle -v /opt/hyhal:/opt/hyhal:ro -it <Your Image ID> bash
cd imagegenerate_paddle
pip install -r requirements.txt
```
......@@ -41,9 +41,9 @@ docker run --shm-size 16g --network=host --name=image_generate_paddle --privileg
关于本项目DCU显卡所需的特殊深度学习库可从[光合](https://developer.hpccube.com/tool/)开发者社区下载安装。
```
DTK驱动:dtk23.04
python:python3.9
paddle:2.4.2
DTK驱动:dtk24.04.1
python:python3.10
paddle:2.5.2
```
`Tips:以上dtk驱动、python、paddle等DCU相关工具版本需要严格一一对应`
......@@ -68,6 +68,7 @@ pip install -r requirements.txt
- 切换文生图、图生图、文生图定制化训练参考 inference文件内注释
- 方法二:使用notebook运行main.ipynb
- 根据notebook提示运行代码
- 若报找不到‘ui'模块,则可在代码前面尝试添加import sys;sys.path.append('/path/to/your/project')
### 测试
- 测试环境、功能是否够能够正常
```python
......
FROM image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.4.2-centos7.6-dtk-23.04-py39-latest
FROM image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.5.2-ubuntu20.04-dtk24.04.1-py3.10
RUN source /opt/dtk/env.sh
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
......
......@@ -79,12 +79,12 @@ def package_install(verbose = True):
except (ModuleNotFoundError, ImportError, AttributeError):
if verbose: print('检测到库不完整, 正在安装库')
os.system("pip install -U pip -i https://mirror.baidu.com/pypi/simple")
os.system("pip install -U OmegaConf --user")
os.system("pip install ppdiffusers==0.9.0 --user")
os.system("pip install paddlenlp==2.4.9 --user")
os.system("pip install -U safetensors --user")
clear_output()
#os.system("pip install -U pip -i https://mirror.baidu.com/pypi/simple")
#os.system("pip install -U OmegaConf --user")
#os.system("pip install ppdiffusers==0.9.0 --user")
#os.system("pip install paddlenlp==2.4.9 --user")
#os.system("pip install -U safetensors --user")
#clear_output()
def diffusers_auto_update(verbose = True):
package_install(verbose=verbose)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment