forked from PaddlePaddle/PaddleMIX
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request PaddlePaddle#733 from luyao-cv/develop
add env_run.sh and correct packages version
- Loading branch information
Showing
11 changed files
with
144 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# 设置错误时退出 | ||
set -e | ||
|
||
echo "开始安装 PaddleMIX 及其依赖..." | ||
|
||
# 安装 PaddleMIX | ||
echo "安装 PaddleMIX..." | ||
pip install -e . | ||
|
||
# 安装 ppdiffusers | ||
echo "安装 ppdiffusers..." | ||
cd ppdiffusers | ||
pip install -e . | ||
cd .. | ||
|
||
# 安装依赖包 | ||
echo "安装依赖包..." | ||
pip install -r requirements.txt | ||
|
||
# 安装自定义算子 | ||
echo "安装自定义算子..." | ||
cd paddlemix/external_ops | ||
python setup.py install | ||
cd ../../ | ||
|
||
echo "安装完成!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
# 设置错误时退出 | ||
set -e | ||
|
||
echo "开始安装 paddlepaddle ..." | ||
# 检测 CUDA 版本并安装相应的 paddlepaddle | ||
if command -v nvcc &> /dev/null; then | ||
cuda_version=$(nvcc --version | grep "release" | sed -n 's/.*release \([0-9]\+\.[0-9]\+\).*/\1/p') | ||
echo "检测到 CUDA 版本: $cuda_version" | ||
if [[ "$cuda_version" == "11.2" ]]; then | ||
echo "安装 CUDA 11.2 版本的 paddlepaddle..." | ||
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu112/ | ||
elif [[ "$cuda_version" == "11.6" ]]; then | ||
echo "安装 CUDA 11.6 版本的 paddlepaddle..." | ||
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu116/ | ||
elif [[ "$cuda_version" == "11.7" ]]; then | ||
echo "安装 CUDA 11.7 版本的 paddlepaddle..." | ||
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu117/ | ||
elif [[ "$cuda_version" == "11.8" ]]; then | ||
echo "安装 CUDA 11.8 版本的 paddlepaddle..." | ||
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu118/ | ||
elif [[ "$cuda_version" == "12.3" ]]; then | ||
echo "安装 CUDA 12.3 版本的 paddlepaddle..." | ||
python -m pip install paddlepaddle-gpu==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cu123/ | ||
else | ||
echo "警告: 不支持的 CUDA 版本。请手动安装适合您系统的 paddlepaddle 版本。" | ||
fi | ||
else | ||
echo "未检测到 CUDA。安装 CPU 版本的 paddlepaddle..." | ||
pip install paddlepaddle-gpu==3.0.0b1 | ||
fi | ||
|
||
echo "安装完成!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters