-
Notifications
You must be signed in to change notification settings - Fork 6
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 #14 from aws-samples/mllm
add m llm support
- Loading branch information
Showing
34 changed files
with
1,060 additions
and
338 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[submodule "backend/LLaMA-Factory"] | ||
path = backend/LLaMA-Factory | ||
url = https://github.com/xiehust/LLaMA-Factory.git | ||
branch = main |
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,56 @@ | ||
|
||
# 定义要添加的内容 | ||
MIRROR_LINE="-i https://pypi.tuna.tsinghua.edu.cn/simple" | ||
|
||
# 处理 backend/requirements.txt | ||
BACKEND_REQ="/home/ubuntu/llm_model_hub/backend/requirements.txt" | ||
if [ -f "$BACKEND_REQ" ]; then | ||
sed -i "1i$MIRROR_LINE" "$BACKEND_REQ" | ||
echo "Added mirror line to $BACKEND_REQ" | ||
else | ||
echo "File $BACKEND_REQ not found" | ||
fi | ||
|
||
# 处理 backend/byoc/requirements.txt | ||
BACKEND2_REQ="/home/ubuntu/llm_model_hub/backend/byoc/requirements.txt" | ||
if [ -f "$BACKEND2_REQ" ]; then | ||
sed -i "1i$MIRROR_LINE" "$BACKEND2_REQ" | ||
echo "Added mirror line to $BACKEND2_REQ" | ||
sed -i 's|https://github.com/|https://gitclone.com/github.com/|' "$BACKEND2_REQ" | ||
else | ||
echo "File $BACKEND2_REQ not found" | ||
fi | ||
|
||
|
||
|
||
# 处理 backend/LLaMA-Factory/requirements.txt | ||
LLAMA_REQ="/home/ubuntu/llm_model_hub/backend/LLaMA-Factory/requirements.txt" | ||
if [ -f "$LLAMA_REQ" ]; then | ||
sed -i "1i$MIRROR_LINE" "$LLAMA_REQ" | ||
sed -i 's|https://github.com/|https://gitclone.com/github.com/|' "$LLAMA_REQ" | ||
echo "Modified $LLAMA_REQ" | ||
else | ||
echo "File $LLAMA_REQ not found" | ||
fi | ||
|
||
# 添加 Docker 配置 | ||
DOCKER_CONFIG="/etc/docker/daemon.json" | ||
sudo mkdir -p /etc/docker | ||
sudo tee "$DOCKER_CONFIG" > /dev/null <<EOT | ||
{ | ||
"registry-mirrors" : | ||
[ | ||
"https://docker.m.daocloud.io", | ||
"https://noohub.ru", | ||
"https://huecker.io", | ||
"https://dockerhub.timeweb.cloud" | ||
] | ||
} | ||
EOT | ||
echo "Docker configuration added to $DOCKER_CONFIG" | ||
|
||
# 重启 Docker 服务 | ||
sudo systemctl restart docker | ||
echo "Docker service restarted" | ||
|
||
echo "Script execution completed." |
Submodule LLaMA-Factory
updated
129 files
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
transformers @ git+https://github.com/huggingface/transformers.git@21fac7abba2a37fae86106f87fcf9974fd1e3830 |
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
Oops, something went wrong.