Added traefik for production inference through tunnel
This commit is contained in:
parent
f58b4dbe35
commit
7becac6619
1 changed files with 13 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ services:
|
||||||
- driver: nvidia
|
- driver: nvidia
|
||||||
count: all
|
count: all
|
||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- INFERENCE_HTTP_HOST=0.0.0.0
|
- INFERENCE_HTTP_HOST=0.0.0.0
|
||||||
- INFERENCE_HTTP_PORT=8001
|
- INFERENCE_HTTP_PORT=8001
|
||||||
|
|
@ -19,9 +20,19 @@ services:
|
||||||
- PYTHONPATH=/app
|
- PYTHONPATH=/app
|
||||||
- HF_HOME=/root/.cache/huggingface
|
- HF_HOME=/root/.cache/huggingface
|
||||||
- HF_HUB_OFFLINE=1
|
- HF_HUB_OFFLINE=1
|
||||||
ports:
|
|
||||||
- '0.0.0.0:58001:8001'
|
|
||||||
volumes:
|
volumes:
|
||||||
- ../../:/app
|
- ../../:/app
|
||||||
- ../../models:/app/models
|
- ../../models:/app/models
|
||||||
- ../../hf_cache:/root/.cache/huggingface
|
- ../../hf_cache:/root/.cache/huggingface
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.llm.rule=Host(`${LLM_DOMAIN_NAME}`)"
|
||||||
|
- "traefik.http.routers.llm.entrypoints=web"
|
||||||
|
- "traefik.http.services.llm.loadbalancer.server.port=${LLM_PORT}"
|
||||||
|
- "traefik.docker.network=proxy-net"
|
||||||
|
networks:
|
||||||
|
- proxy-net
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy-net:
|
||||||
|
external: true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue