Skip to content

Commit 5d1c423

Browse files
committed
cachgin
1 parent 721de78 commit 5d1c423

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎compose/docker-compose-v2.yml‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ services:
3232
- *app
3333
- *entrypoint
3434
- *models
35+
# Persist ONNX weights + compiled TRT engines across deploys (see notes
36+
# in docker-compose.yml). Prevents re-download/re-compile on every redeploy.
37+
- ifr_onnx:/models/onnx
38+
- ifr_trt_engines:/models/trt-engines
3539
deploy:
3640
resources:
3741
reservations:
@@ -53,6 +57,10 @@ services:
5357
- *app
5458
- *entrypoint
5559
- *models
60+
# Persist ONNX weights + compiled TRT engines across deploys (see notes
61+
# in docker-compose.yml). Prevents re-download/re-compile on every redeploy.
62+
- ifr_onnx:/models/onnx
63+
- ifr_trt_engines:/models/trt-engines
5664
deploy:
5765
resources:
5866
reservations:
@@ -77,6 +85,10 @@ services:
7785
- *app
7886
- *entrypoint
7987
- *models
88+
# Persist ONNX weights + compiled TRT engines across deploys (see notes
89+
# in docker-compose.yml). Prevents re-download/re-compile on every redeploy.
90+
- ifr_onnx:/models/onnx
91+
- ifr_trt_engines:/models/trt-engines
8092

8193
nginx:
8294
profiles: ['mgpu']
@@ -93,4 +105,8 @@ services:
93105
soft: 200000
94106
hard: 200000
95107

108+
volumes:
109+
ifr_onnx:
110+
ifr_trt_engines:
111+
96112

‎compose/docker-compose.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ services:
99
- .env
1010
volumes:
1111
- ../models:/models
12+
# Persist downloaded ONNX weights and compiled TensorRT engines across
13+
# deploys. Without these, every redeploy re-downloads models and
14+
# recompiles TRT engines from scratch (the multi-minute startup cost).
15+
- ifr_onnx:/models/onnx
16+
- ifr_trt_engines:/models/trt-engines
1217
- ../if_rest:/app/if_rest
1318
- ../entrypoint.sh:/app/entrypoint.sh
1419
- ../misc/test_images:/images/test_images
@@ -29,3 +34,7 @@ services:
2934
# Must exceed model download + TRT engine warmup on first boot, otherwise
3035
# the container is killed mid-startup and never reaches "healthy".
3136
start_period: 240s
37+
38+
volumes:
39+
ifr_onnx:
40+
ifr_trt_engines:

0 commit comments

Comments
 (0)