为照片识别编写docker

This commit is contained in:
2024-07-18 11:19:21 +08:00
parent 31256a6271
commit 74e9989f34
3 changed files with 114 additions and 9 deletions

View File

@@ -1,14 +1,101 @@
version: '3.9'
services:
photo_mask_1:
container_name: photo_mask_1
image: photo_mask
photo_review_1:
container_name: photo_review_1
image: fcb_photo_review
build:
context: .
args:
VERSION: "0.0.1"
volumes:
- ./log:/app/log
restart: always
command: [ "photo_review.py", "--clean", "True" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "0", "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_review_2:
container_name: photo_review_2
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_review_1
command: [ "photo_review.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "0", "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_review_3:
container_name: photo_review_3
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_review_2
command: [ "photo_review.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "0", "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_review_4:
container_name: photo_review_4
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_review_3
command: [ "photo_review.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "0", "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_review_5:
container_name: photo_review_5
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_review_4
command: [ "photo_review.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "0", "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_mask_1:
container_name: photo_mask_1
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_review_1
command: [ "photo_mask.py", "--clean", "True" ]
deploy:
resources:
@@ -20,7 +107,7 @@ services:
photo_mask_2:
container_name: photo_mask_2
image: photo_mask
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
@@ -37,7 +124,7 @@ services:
photo_mask_3:
container_name: photo_mask_3
image: photo_mask
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
@@ -50,4 +137,4 @@ services:
devices:
- device_ids: [ "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
driver: "nvidia"