调整model的存放位置

This commit is contained in:
2024-07-18 16:23:58 +08:00
parent 9bd7038d5f
commit cb77f229ab
5 changed files with 148 additions and 6 deletions

2
.gitignore vendored
View File

@@ -142,4 +142,4 @@ cython_debug/
.idea
### Model
config/model
model

51
docker-compose-mask.yml Normal file
View File

@@ -0,0 +1,51 @@
services:
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:
reservations:
devices:
- device_ids: [ "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_mask_2:
container_name: photo_mask_2
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_mask_1
command: [ "photo_mask.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"
photo_mask_3:
container_name: photo_mask_3
image: fcb_photo_review
volumes:
- ./log:/app/log
restart: always
depends_on:
- photo_mask_2
command: [ "photo_mask.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"

88
docker-compose-review.yml Normal file
View File

@@ -0,0 +1,88 @@
services:
photo_review_1:
container_name: photo_review_1
image: fcb_photo_review
volumes:
- ./log:/app/log
- ./model:/app/model
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
- ./model:/app/model
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
- ./model:/app/model
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
- ./model:/app/model
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
- ./model:/app/model
restart: always
depends_on:
- photo_review_4
command: [ "photo_review.py" ]
deploy:
resources:
reservations:
devices:
- device_ids: [ "0", "1" ]
capabilities: [ "gpu" ]
driver: "nvidia"

View File

@@ -8,6 +8,7 @@ services:
VERSION: "0.0.3"
volumes:
- ./log:/app/log
- ./model:/app/model
restart: always
command: [ "photo_review.py", "--clean", "True" ]
deploy:
@@ -23,6 +24,7 @@ services:
image: fcb_photo_review
volumes:
- ./log:/app/log
- ./model:/app/model
restart: always
depends_on:
- photo_review_1
@@ -40,6 +42,7 @@ services:
image: fcb_photo_review
volumes:
- ./log:/app/log
- ./model:/app/model
restart: always
depends_on:
- photo_review_2
@@ -57,6 +60,7 @@ services:
image: fcb_photo_review
volumes:
- ./log:/app/log
- ./model:/app/model
restart: always
depends_on:
- photo_review_3
@@ -74,6 +78,7 @@ services:
image: fcb_photo_review
volumes:
- ./log:/app/log
- ./model:/app/model
restart: always
depends_on:
- photo_review_4

View File

@@ -60,12 +60,10 @@ COST_LIST_SCHEMA = PATIENT_NAME + ADMISSION_DATE + DISCHARGE_DATE + MEDICAL_EXPE
模型配置
"""
SETTLEMENT_IE = Taskflow("information_extraction", schema=SETTLEMENT_LIST_SCHEMA, model="uie-x-base",
task_path="config/model/settlement_list_model", layout_analysis=LAYOUT_ANALYSIS,
precision='fp16')
task_path="model/settlement_list_model", layout_analysis=LAYOUT_ANALYSIS, precision='fp16')
DISCHARGE_IE = Taskflow("information_extraction", schema=DISCHARGE_RECORD_SCHEMA, model="uie-x-base",
task_path="config/model/discharge_record_model", layout_analysis=LAYOUT_ANALYSIS,
precision='fp16')
task_path="model/discharge_record_model", layout_analysis=LAYOUT_ANALYSIS, precision='fp16')
COST_IE = Taskflow("information_extraction", schema=COST_LIST_SCHEMA, model="uie-x-base", device_id=1,
task_path="config/model/cost_list_model", layout_analysis=LAYOUT_ANALYSIS, precision='fp16')
task_path="model/cost_list_model", layout_analysis=LAYOUT_ANALYSIS, precision='fp16')
OCR = PaddleOCR(use_angle_cls=False, lang="ch", show_log=False, gpu_id=1)