-
-
Notifications
You must be signed in to change notification settings - Fork 129
/
Copy pathdocker-compose.yml
24 lines (23 loc) · 1.29 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
version: "3"
services:
MaterialSearch:
# image: registry.cn-hongkong.aliyuncs.com/chn-lee-yumi/materialsearch:latest # 通过 GitHub Action 构建,支持amd64和arm64
image: registry.cn-guangzhou.aliyuncs.com/chn-lee-yumi/materialsearch:latest # 通过阿里云容器镜像服务构建,仅支持amd64,如果你需要运行在arm64主机上,请使用上面的镜像
restart: always # 容器重启规则设为always
ports:
- "8085:8085" # 映射容器的8085端口到宿主的8085端口(宿主端口:容器端口)
environment: # 通过环境变量修改配置,注意下面填的路径是容器里面的路径,不是宿主的路径
- ASSETS_PATH=/home,/mnt
- SKIP_PATH=/tmp
volumes: # 将宿主的目录挂载到容器里(宿主路径:容器路径)
- /srv/MaterialSearch/db:/MaterialSearch/instance/ # 挂载宿主/srv/MaterialSearch/db到容器的/MaterialSearch/instance/
- /home:/home # 挂载宿主/home到容器的/home
- /mnt:/mnt # 挂载宿主/mnt到容器的/mnt
# 如果使用GPU,就取消注释下面的内容,并在上面environment处添加DEVICE=cuda
#deploy:
# resources:
# reservations:
# devices:
# - driver: nvidia
# count: all
# capabilities: [ gpu ]