Skip to content

Commit 4911740

Browse files
committed
更新docker-compose说明
1 parent 49cea97 commit 4911740

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

docker-compose.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,28 @@
1-
#【请修改完参数后,删除此行】请在以下方案中选择一种,然后删除其他的方案,最后docker-compose up运行 | Please choose from one of these options below, delete other options as well as This Line
1+
## ===================================================
2+
# docker-compose.yml
3+
## ===================================================
4+
# 1. 请在以下方案中选择任意一种,然后删除其他的方案
5+
# 2. 修改你选择的方案中的environment环境变量,详情请见github wiki或者config.py
6+
# 3. 选择一种暴露服务端口的方法,并对相应的配置做出修改:
7+
# 【方法1: 适用于Linux,很方便,可惜windows不支持】与宿主的网络融合为一体,这个是默认配置
8+
# network_mode: "host"
9+
# 【方法2: 适用于所有系统包括Windows和MacOS】端口映射,把容器的端口映射到宿主的端口(注意您需要先删除network_mode: "host",再追加以下内容)
10+
# ports:
11+
# - "12345:12345" # 注意!12345必须与WEB_PORT环境变量相互对应
12+
# 4. 最后`docker-compose up`运行
13+
# 5. 如果希望使用显卡,请关注 LOCAL_MODEL_DEVICE 和 英伟达显卡运行时 选项
14+
## ===================================================
15+
# 1. Please choose one of the following options and delete the others.
16+
# 2. Modify the environment variables in the selected option, see GitHub wiki or config.py for more details.
17+
# 3. Choose a method to expose the server port and make the corresponding configuration changes:
18+
# [Method 1: Suitable for Linux, convenient, but not supported for Windows] Fusion with the host network, this is the default configuration
19+
# network_mode: "host"
20+
# [Method 2: Suitable for all systems including Windows and MacOS] Port mapping, mapping the container port to the host port (note that you need to delete network_mode: "host" first, and then add the following content)
21+
# ports:
22+
# - "12345: 12345" # Note! 12345 must correspond to the WEB_PORT environment variable.
23+
# 4. Finally, run `docker-compose up`.
24+
# 5. If you want to use a graphics card, pay attention to the LOCAL_MODEL_DEVICE and Nvidia GPU runtime options.
25+
## ===================================================
226

327
## ===================================================
428
## 【方案零】 部署项目的全部能力(这个是包含cuda和latex的大型镜像。如果您网速慢、硬盘小或没有显卡,则不推荐使用这个)
@@ -39,10 +63,14 @@ services:
3963
# count: 1
4064
# capabilities: [gpu]
4165

42-
# 与宿主的网络融合
66+
# 【WEB_PORT暴露方法1: 适用于Linux】与宿主的网络融合
4367
network_mode: "host"
4468

45-
# 不使用代理网络拉取最新代码
69+
# 【WEB_PORT暴露方法2: 适用于所有系统】端口映射
70+
# ports:
71+
# - "12345:12345" # 12345必须与WEB_PORT相互对应
72+
73+
# 启动容器后,运行main.py主程序
4674
command: >
4775
bash -c "python3 -u main.py"
4876

0 commit comments

Comments
 (0)