update docker compose
This commit is contained in:
		
							parent
							
								
									84fc8647f7
								
							
						
					
					
						commit
						624d203bbc
					
				@ -1,34 +1,30 @@
 | 
				
			|||||||
【请修改完参数后,删除此行】请在以下方案中选择一种,然后删除其他的方案,最后docker-compose up运行 | Please choose from one of these options below, delete other options as well as This Line
 | 
					#【请修改完参数后,删除此行】请在以下方案中选择一种,然后删除其他的方案,最后docker-compose up运行 | Please choose from one of these options below, delete other options as well as This Line
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## ===================================================
 | 
					## ===================================================
 | 
				
			||||||
## 【方案一】 如果不需要运行本地模型(仅chatgpt类远程服务)
 | 
					## 【方案一】 如果不需要运行本地模型(仅chatgpt,newbing类远程服务)
 | 
				
			||||||
## ===================================================
 | 
					## ===================================================
 | 
				
			||||||
version: '3'
 | 
					version: '3'
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
  gpt_academic_nolocalllms:
 | 
					  gpt_academic_nolocalllms:
 | 
				
			||||||
    image: fuqingxu/gpt_academic:no-local-llms        
 | 
					    image: ghcr.io/binary-husky/gpt_academic_nolocal:master
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      # 请查阅 `config.py` 以查看所有的配置信息
 | 
					      # 请查阅 `config.py` 以查看所有的配置信息
 | 
				
			||||||
      API_KEY:                  '    sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  '
 | 
					      API_KEY:                  '    sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                            '
 | 
				
			||||||
      USE_PROXY:                '    True                                                                                           '
 | 
					      USE_PROXY:                '    True                                                                                           '
 | 
				
			||||||
      proxies:                  '    { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", }                 '
 | 
					      proxies:                  '    { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", }                 '
 | 
				
			||||||
      LLM_MODEL:                '    gpt-3.5-turbo                                                                                  '
 | 
					      LLM_MODEL:                '    gpt-3.5-turbo                                                                                  '
 | 
				
			||||||
      AVAIL_LLM_MODELS:         '    ["gpt-3.5-turbo", "api2d-gpt-4"]                                                               '
 | 
					      AVAIL_LLM_MODELS:         '    ["gpt-3.5-turbo", "api2d-gpt-3.5-turbo", "gpt-4", "api2d-gpt-4", "newbing"]                    '
 | 
				
			||||||
      DEFAULT_WORKER_NUM:       '    10                                                                                             '
 | 
					 | 
				
			||||||
      WEB_PORT:                 '    22303                                                                                          '
 | 
					      WEB_PORT:                 '    22303                                                                                          '
 | 
				
			||||||
      ADD_WAIFU:                '    True                                                                                           '
 | 
					      ADD_WAIFU:                '    True                                                                                           '
 | 
				
			||||||
      AUTHENTICATION:           '    [("username", "passwd"), ("username2", "passwd2")]                                             '
 | 
					      # DEFAULT_WORKER_NUM:       '    10                                                                                             '
 | 
				
			||||||
 | 
					      # AUTHENTICATION:           '    [("username", "passwd"), ("username2", "passwd2")]                                             '
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # 与宿主的网络融合
 | 
					    # 与宿主的网络融合
 | 
				
			||||||
    network_mode: "host"
 | 
					    network_mode: "host"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # 不使用代理网络拉取最新代码
 | 
					    # 不使用代理网络拉取最新代码
 | 
				
			||||||
    command: >
 | 
					    command: >
 | 
				
			||||||
      bash -c " echo '[gpt-academic] 正在从github拉取最新代码...' &&
 | 
					      bash -c "python3 -u main.py"
 | 
				
			||||||
                git checkout master --force &&
 | 
					 | 
				
			||||||
                git remote set-url origin https://github.com/binary-husky/chatgpt_academic.git &&
 | 
					 | 
				
			||||||
                git pull &&
 | 
					 | 
				
			||||||
                python3 -u main.py"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ===================================================
 | 
					### ===================================================
 | 
				
			||||||
@ -37,19 +33,19 @@ services:
 | 
				
			|||||||
version: '3'
 | 
					version: '3'
 | 
				
			||||||
services:
 | 
					services:
 | 
				
			||||||
  gpt_academic_with_chatglm:
 | 
					  gpt_academic_with_chatglm:
 | 
				
			||||||
    image: fuqingxu/gpt_academic:chatgpt-chatglm-newbing    # [option 2] 如果需要运行ChatGLM本地模型
 | 
					    image: ghcr.io/binary-husky/gpt_academic_chatglm_moss:master
 | 
				
			||||||
    environment:
 | 
					    environment:
 | 
				
			||||||
      # 请查阅 `config.py` 以查看所有的配置信息
 | 
					      # 请查阅 `config.py` 以查看所有的配置信息
 | 
				
			||||||
      API_KEY:                  '    sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  '
 | 
					      API_KEY:                  '    sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,fkxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx  '
 | 
				
			||||||
      USE_PROXY:                '    True                                                                                           '
 | 
					      USE_PROXY:                '    True                                                                                           '
 | 
				
			||||||
      proxies:                  '    { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", }                 '
 | 
					      proxies:                  '    { "http": "socks5h://localhost:10880", "https": "socks5h://localhost:10880", }                 '
 | 
				
			||||||
      LLM_MODEL:                '    gpt-3.5-turbo                                                                                  '
 | 
					      LLM_MODEL:                '    gpt-3.5-turbo                                                                                  '
 | 
				
			||||||
      AVAIL_LLM_MODELS:         '    ["gpt-3.5-turbo", "api2d-gpt-4", "chatglm"]                                                    '
 | 
					      AVAIL_LLM_MODELS:         '    ["chatglm", "moss", "gpt-3.5-turbo", "gpt-4", "newbing"]                                       '
 | 
				
			||||||
      LOCAL_MODEL_DEVICE:       '    cuda                                                                                           '
 | 
					      LOCAL_MODEL_DEVICE:       '    cuda                                                                                           '
 | 
				
			||||||
      DEFAULT_WORKER_NUM:       '    10                                                                                             '
 | 
					      DEFAULT_WORKER_NUM:       '    10                                                                                             '
 | 
				
			||||||
      WEB_PORT:                 '    12303                                                                                          '
 | 
					      WEB_PORT:                 '    12303                                                                                          '
 | 
				
			||||||
      ADD_WAIFU:                '    True                                                                                           '
 | 
					      ADD_WAIFU:                '    True                                                                                           '
 | 
				
			||||||
      AUTHENTICATION:           '    [("username", "passwd"), ("username2", "passwd2")]                                             '
 | 
					      # AUTHENTICATION:           '    [("username", "passwd"), ("username2", "passwd2")]                                             '
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # 显卡的使用,nvidia0指第0个GPU
 | 
					    # 显卡的使用,nvidia0指第0个GPU
 | 
				
			||||||
    runtime: nvidia
 | 
					    runtime: nvidia
 | 
				
			||||||
@ -58,21 +54,8 @@ services:
 | 
				
			|||||||
      
 | 
					      
 | 
				
			||||||
    # 与宿主的网络融合
 | 
					    # 与宿主的网络融合
 | 
				
			||||||
    network_mode: "host"
 | 
					    network_mode: "host"
 | 
				
			||||||
 | 
					 | 
				
			||||||
    # 使用代理网络拉取最新代码
 | 
					 | 
				
			||||||
    # command: >
 | 
					 | 
				
			||||||
    #   bash -c "       echo '[gpt-academic] 正在从github拉取最新代码...' &&
 | 
					 | 
				
			||||||
    #                   truncate -s -1 /etc/proxychains.conf &&
 | 
					 | 
				
			||||||
    #                   echo \"socks5 127.0.0.1 10880\" >> /etc/proxychains.conf &&
 | 
					 | 
				
			||||||
    #                   proxychains git pull &&
 | 
					 | 
				
			||||||
    #                   python3 -u main.py "
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # 不使用代理网络拉取最新代码
 | 
					 | 
				
			||||||
    command: >
 | 
					    command: >
 | 
				
			||||||
      bash -c " echo '[gpt-academic] 正在从github拉取最新代码...' &&
 | 
					      bash -c "python3 -u main.py"
 | 
				
			||||||
                git pull &&
 | 
					 | 
				
			||||||
                python3 -u main.py"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ===================================================
 | 
					### ===================================================
 | 
				
			||||||
### 【方案三】 如果需要运行ChatGPT + LLAMA + 盘古 + RWKV本地模型
 | 
					### 【方案三】 如果需要运行ChatGPT + LLAMA + 盘古 + RWKV本地模型
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user