Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
SIPC committed Mar 19, 2024
1 parent 74ce55c commit 060a693
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,25 @@ bash -c "$(curl -fsSLk https://raw.githubusercontent.com/SIPC/Lyrify/main/setup.
### Docker 部署

```shell
docker run -d --name lyrify \
-p 3000:3000 \
-e OpenAI_API_KEY='sk-...' \
-e OpenAI_API_ENDPOINT='https://api.openai.com/v1/chat/completions' \
-e OpenAI_MODEL='gpt-3.5-turbo' \
-e NIUTRANS_KEY='...' \
-e DEEPL_X_API_URL='...' \
sipcink/lyrify:latest
docker run -d --name lyrify \
-p 3000:3000 \
-e ChatNio_API_KEY="$chatnio_api_key" \
-e OpenAI_API_ENDPOINT="$openai_api_endpoint" \
-e OpenAI_API_KEY="$openai_api_key" \
-e OpenAI_MODEL="$openai_model" \
-e Gemini_API_ENDPOINT="$gemini_api_endpoint" \
-e Gemini_API_KEY="$gemini_api_key" \
-e NIUTRANS_KEY="$niutrans_key" \
-e DEEPL_X_API_URL="$deepl_x_api_url" \
-e BAIDU_APP_ID="$baidu_app_id" \
-e BAIDU_KEY="$baidu_key" \
-e QWEN_API_ENDPOINT="$qwen_api_endpoint" \
-e QWEN_API_KEY="$qwen_api_key" \
-e QWEN_MODEL="$qwen_model" \
-e GLM_API_ENDPOINT="$glm_api_endpoint" \
-e GLM_API_KEY="$glm_api_key" \
-e GLM_MODEL="$glm_model" \
sipcink/lyrify:latest
```

> Github Workflow 自动打包
Expand Down
6 changes: 6 additions & 0 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ if docker ps -a -q --filter "name=lyrify" | grep -q .; then
source "/tmp/.Lyrify/config.txt"
else
echo "config.txt 未找到,请重新输入以下信息以配置 Lyrify:"
read -p "Chat Nio API Key: " chatnio_api_key
read -p "OpenAI API Endpoint (Press Enter to use default)" openai_api_endpoint
read -p "OpenAI API Key: " openai_api_key
read -p "OpenAI Model: " openai_model
Expand All @@ -88,6 +89,7 @@ if docker ps -a -q --filter "name=lyrify" | grep -q .; then
read -p "GLM Model: " glm_model

cat <<EOL >/tmp/.Lyrify/config.txt
chatnio_api_key=$chatnio_api_key
openai_api_endpoint=${openai_api_endpoint:-https://api.openai.com/v1/chat/completions}
openai_api_key=$openai_api_key
openai_model=$openai_model
Expand All @@ -113,6 +115,7 @@ EOL
docker stop lyrify >/dev/null 2>&1 && docker rm lyrify >/dev/null 2>&1
docker run -d --name lyrify \
-p 3000:3000 \
-e ChatNio_API_KEY="$chatnio_api_key" \
-e OpenAI_API_ENDPOINT="$openai_api_endpoint" \
-e OpenAI_API_KEY="$openai_api_key" \
-e OpenAI_MODEL="$openai_model" \
Expand Down Expand Up @@ -153,6 +156,7 @@ else
cd "/tmp/.Lyrify"

info "请输入以下信息以配置 Lyrify:"
read -p "Chat Nio API Key: " chatnio_api_key
read -p "OpenAI API Endpoint (Press Enter to use default): " openai_api_endpoint
read -p "OpenAI API Key: " openai_api_key
read -p "OpenAI Model: " openai_model
Expand All @@ -170,6 +174,7 @@ else
read -p "GLM Model: " glm_model

cat <<EOL >config.txt
chatnio_api_key=$chatnio_api_key
openai_api_endpoint=${openai_api_endpoint:-https://api.openai.com/v1/chat/completions}
openai_api_key=$openai_api_key
openai_model=$openai_model
Expand All @@ -189,6 +194,7 @@ EOL

docker run -d --name lyrify \
-p 3000:3000 \
-e ChatNio_API_KEY="$chatnio_api_key" \
-e OpenAI_API_ENDPOINT="$openai_api_endpoint" \
-e OpenAI_API_KEY="$openai_api_key" \
-e OpenAI_MODEL="$openai_model" \
Expand Down

0 comments on commit 060a693

Please sign in to comment.