Extract environment variable
parent
ac0bcd39eb
commit
c990ba843f
|
|
@ -0,0 +1,2 @@
|
||||||
|
MODEL_NAME=TabbyML/J-350M
|
||||||
|
HF_VOLUME="../data/hf_cache:/root/.cache/huggingface"
|
||||||
|
|
@ -4,21 +4,21 @@ services:
|
||||||
init:
|
init:
|
||||||
image: tabbyml/tabby
|
image: tabbyml/tabby
|
||||||
container_name: tabby-init
|
container_name: tabby-init
|
||||||
command: python -m tabby.tools.model_preload --repo_id TabbyML/J-350M
|
command: python -m tabby.tools.model_preload --repo_id ${MODEL_NAME}
|
||||||
volumes:
|
volumes:
|
||||||
- ../data/hf_cache:/root/.cache/huggingface
|
- ${HF_VOLUME}
|
||||||
|
|
||||||
server:
|
server:
|
||||||
image: tabbyml/tabby
|
image: tabbyml/tabby
|
||||||
container_name: tabby-server
|
container_name: tabby-server
|
||||||
command: uvicorn tabby.server:app --host 0.0.0.0 --port 5000
|
command: uvicorn tabby.server:app --host 0.0.0.0 --port 5000
|
||||||
environment:
|
environment:
|
||||||
- MODEL_NAME=TabbyML/J-350M
|
MODEL_NAME: ${MODEL_NAME}
|
||||||
- MODEL_BACKEND=triton
|
MODEL_BACKEND: triton
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ../data/hf_cache:/root/.cache/huggingface
|
- ${HF_VOLUME}
|
||||||
depends_on:
|
depends_on:
|
||||||
init:
|
init:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
@ -39,7 +39,7 @@ services:
|
||||||
shm_size: 1gb
|
shm_size: 1gb
|
||||||
volumes:
|
volumes:
|
||||||
- ./scripts:/scripts
|
- ./scripts:/scripts
|
||||||
- ../data/hf_cache:/root/.cache/huggingface
|
- ${HF_VOLUME}
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
reservations:
|
reservations:
|
||||||
|
|
@ -48,7 +48,7 @@ services:
|
||||||
count: all
|
count: all
|
||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
environment:
|
environment:
|
||||||
- MODEL_NAME=TabbyML/J-350M
|
MODEL_NAME: ${MODEL_NAME}
|
||||||
depends_on:
|
depends_on:
|
||||||
init:
|
init:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue