Spaces:
Running
Running
update docker compose
Browse files- docker-compose.yml +12 -29
docker-compose.yml
CHANGED
@@ -1,34 +1,30 @@
|
|
1 |
-
|
2 |
|
3 |
## ===================================================
|
4 |
-
## 【方案一】 如果不需要运行本地模型(仅chatgpt类远程服务)
|
5 |
## ===================================================
|
6 |
version: '3'
|
7 |
services:
|
8 |
gpt_academic_nolocalllms:
|
9 |
-
image:
|
10 |
environment:
|
11 |
# 请查阅 `config.py` 以查看所有的配置信息
|
12 |
-
API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
13 |
USE_PROXY: ' True '
|
14 |
proxies: ' { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", } '
|
15 |
LLM_MODEL: ' gpt-3.5-turbo '
|
16 |
-
AVAIL_LLM_MODELS: ' ["gpt-3.5-turbo", "api2d-gpt-4"]
|
17 |
-
DEFAULT_WORKER_NUM: ' 10 '
|
18 |
WEB_PORT: ' 22303 '
|
19 |
ADD_WAIFU: ' True '
|
20 |
-
|
|
|
21 |
|
22 |
# 与宿主的网络融合
|
23 |
network_mode: "host"
|
24 |
|
25 |
# 不使用代理网络拉取最新代码
|
26 |
command: >
|
27 |
-
bash -c "
|
28 |
-
git checkout master --force &&
|
29 |
-
git remote set-url origin https://github.com/binary-husky/chatgpt_academic.git &&
|
30 |
-
git pull &&
|
31 |
-
python3 -u main.py"
|
32 |
|
33 |
|
34 |
### ===================================================
|
@@ -37,19 +33,19 @@ services:
|
|
37 |
version: '3'
|
38 |
services:
|
39 |
gpt_academic_with_chatglm:
|
40 |
-
image:
|
41 |
environment:
|
42 |
# 请查阅 `config.py` 以查看所有的配置信息
|
43 |
API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '
|
44 |
USE_PROXY: ' True '
|
45 |
proxies: ' { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", } '
|
46 |
LLM_MODEL: ' gpt-3.5-turbo '
|
47 |
-
AVAIL_LLM_MODELS: ' ["gpt-3.5-turbo", "
|
48 |
LOCAL_MODEL_DEVICE: ' cuda '
|
49 |
DEFAULT_WORKER_NUM: ' 10 '
|
50 |
WEB_PORT: ' 12303 '
|
51 |
ADD_WAIFU: ' True '
|
52 |
-
AUTHENTICATION: ' [("username", "passwd"), ("username2", "passwd2")] '
|
53 |
|
54 |
# 显卡的使用,nvidia0指第0个GPU
|
55 |
runtime: nvidia
|
@@ -58,21 +54,8 @@ services:
|
|
58 |
|
59 |
# 与宿主的网络融合
|
60 |
network_mode: "host"
|
61 |
-
|
62 |
-
# 使用代理网络拉取最新代码
|
63 |
-
# command: >
|
64 |
-
# bash -c " echo '[gpt-academic] 正在从github拉取最新代码...' &&
|
65 |
-
# truncate -s -1 /etc/proxychains.conf &&
|
66 |
-
# echo \"socks5 127.0.0.1 10880\" >> /etc/proxychains.conf &&
|
67 |
-
# proxychains git pull &&
|
68 |
-
# python3 -u main.py "
|
69 |
-
|
70 |
-
# 不使用代理网络拉取最新代码
|
71 |
command: >
|
72 |
-
bash -c "
|
73 |
-
git pull &&
|
74 |
-
python3 -u main.py"
|
75 |
-
|
76 |
|
77 |
### ===================================================
|
78 |
### 【方案三】 如果需要运行ChatGPT + LLAMA + 盘古 + RWKV本地模型
|
|
|
1 |
+
#【请修改完参数后,删除此行】请在以下方案中选择一种,然后删除其他的方案,最后docker-compose up运行 | Please choose from one of these options below, delete other options as well as This Line
|
2 |
|
3 |
## ===================================================
|
4 |
+
## 【方案一】 如果不需要运行本地模型(仅chatgpt,newbing类远程服务)
|
5 |
## ===================================================
|
6 |
version: '3'
|
7 |
services:
|
8 |
gpt_academic_nolocalllms:
|
9 |
+
image: ghcr.io/binary-husky/gpt_academic_nolocal:master
|
10 |
environment:
|
11 |
# 请查阅 `config.py` 以查看所有的配置信息
|
12 |
+
API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '
|
13 |
USE_PROXY: ' True '
|
14 |
proxies: ' { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", } '
|
15 |
LLM_MODEL: ' gpt-3.5-turbo '
|
16 |
+
AVAIL_LLM_MODELS: ' ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "newbing"] '
|
|
|
17 |
WEB_PORT: ' 22303 '
|
18 |
ADD_WAIFU: ' True '
|
19 |
+
# DEFAULT_WORKER_NUM: ' 10 '
|
20 |
+
# AUTHENTICATION: ' [("username", "passwd"), ("username2", "passwd2")] '
|
21 |
|
22 |
# 与宿主的网络融合
|
23 |
network_mode: "host"
|
24 |
|
25 |
# 不使用代理网络拉取最新代码
|
26 |
command: >
|
27 |
+
bash -c "python3 -u main.py"
|
|
|
|
|
|
|
|
|
28 |
|
29 |
|
30 |
### ===================================================
|
|
|
33 |
version: '3'
|
34 |
services:
|
35 |
gpt_academic_with_chatglm:
|
36 |
+
image: ghcr.io/binary-husky/gpt_academic_chatglm_moss:master
|
37 |
environment:
|
38 |
# 请查阅 `config.py` 以查看所有的配置信息
|
39 |
API_KEY: ' sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx '
|
40 |
USE_PROXY: ' True '
|
41 |
proxies: ' { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", } '
|
42 |
LLM_MODEL: ' gpt-3.5-turbo '
|
43 |
+
AVAIL_LLM_MODELS: ' ["chatglm", "moss", "gpt-3.5-turbo", "gpt-4", "newbing"] '
|
44 |
LOCAL_MODEL_DEVICE: ' cuda '
|
45 |
DEFAULT_WORKER_NUM: ' 10 '
|
46 |
WEB_PORT: ' 12303 '
|
47 |
ADD_WAIFU: ' True '
|
48 |
+
# AUTHENTICATION: ' [("username", "passwd"), ("username2", "passwd2")] '
|
49 |
|
50 |
# 显卡的使用,nvidia0指第0个GPU
|
51 |
runtime: nvidia
|
|
|
54 |
|
55 |
# 与宿主的网络融合
|
56 |
network_mode: "host"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
command: >
|
58 |
+
bash -c "python3 -u main.py"
|
|
|
|
|
|
|
59 |
|
60 |
### ===================================================
|
61 |
### 【方案三】 如果需要运行ChatGPT + LLAMA + 盘古 + RWKV本地模型
|