refactor(inference): Remove traeffik in model specific compose files
This commit is contained in:
parent
d97f3c759b
commit
db12863d49
@ -30,16 +30,19 @@ services:
|
|||||||
# Mount the directory that contains the downloaded model.
|
# Mount the directory that contains the downloaded model.
|
||||||
volumes:
|
volumes:
|
||||||
- ./models:/models
|
- ./models:/models
|
||||||
|
ports:
|
||||||
|
- 8000:8000
|
||||||
environment:
|
environment:
|
||||||
# Specify the path to the model for the web application.
|
# Specify the path to the model for the web application.
|
||||||
MODEL: /models/llama-2-7b-chat.ggmlv3.q4_1.bin
|
MODEL: /models/llama-2-7b-chat.ggmlv3.q4_1.bin
|
||||||
|
PYTHONUNBUFFERED: 1
|
||||||
# Health check configuration
|
# Health check configuration
|
||||||
healthcheck:
|
# healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000"]
|
# test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000"]
|
||||||
interval: 30s
|
# interval: 30s
|
||||||
timeout: 10s
|
# timeout: 10s
|
||||||
retries: 3
|
# retries: 3
|
||||||
start_period: 30s
|
# start_period: 30s
|
||||||
# Restart policy configuration
|
# Restart policy configuration
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
# Specifies that this service should start only after wait-for-downloader has completed successfully.
|
# Specifies that this service should start only after wait-for-downloader has completed successfully.
|
||||||
@ -47,31 +50,11 @@ services:
|
|||||||
wait-for-downloader:
|
wait-for-downloader:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
# Connect this service to two networks: inference_net and traefik_public.
|
# Connect this service to two networks: inference_net and traefik_public.
|
||||||
networks:
|
|
||||||
- inference_net
|
|
||||||
- traefik_public
|
|
||||||
|
|
||||||
# Service for Traefik, a modern HTTP reverse proxy and load balancer.
|
|
||||||
traefik:
|
|
||||||
image: traefik:v2.10
|
|
||||||
ports:
|
|
||||||
# Map port 80 in the container to port 80 on the host.
|
|
||||||
- "80:80"
|
|
||||||
# Map port 8080 in the container (Traefik's dashboard) to port 8080 on the host.
|
|
||||||
- "8080:8080"
|
|
||||||
# Mount the Docker socket to allow Traefik to listen to Docker's API.
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
||||||
- ./traefik/traefik.yml:/traefik.yml:ro
|
|
||||||
- ./traefik/config.yml:/config.yml:ro
|
|
||||||
# Connect this service to the traefik_public network.
|
|
||||||
networks:
|
networks:
|
||||||
- traefik_public
|
- traefik_public
|
||||||
|
|
||||||
# Define networks used in this docker-compose file.
|
# Define networks used in this docker-compose file.
|
||||||
networks:
|
networks:
|
||||||
# Network for the llm service (used for inference).
|
|
||||||
inference_net:
|
|
||||||
# Public-facing network that Traefik uses. Marked as external to indicate it may be defined outside this file.
|
# Public-facing network that Traefik uses. Marked as external to indicate it may be defined outside this file.
|
||||||
traefik_public:
|
traefik_public:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
@ -48,12 +48,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 8000:8000
|
- 8000:8000
|
||||||
# Health check configuration
|
# Health check configuration
|
||||||
healthcheck:
|
# healthcheck:
|
||||||
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000"]
|
# test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8000"]
|
||||||
interval: 30s
|
# interval: 30s
|
||||||
timeout: 10s
|
# timeout: 10s
|
||||||
retries: 3
|
# retries: 3
|
||||||
start_period: 30s
|
# start_period: 30s
|
||||||
# Restart policy configuration
|
# Restart policy configuration
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
# Specifies that this service should start only after wait-for-downloader has completed successfully.
|
# Specifies that this service should start only after wait-for-downloader has completed successfully.
|
||||||
@ -61,38 +61,11 @@ services:
|
|||||||
wait-for-downloader:
|
wait-for-downloader:
|
||||||
condition: service_completed_successfully
|
condition: service_completed_successfully
|
||||||
# Connect this service to two networks: inference_net and traefik_public.
|
# Connect this service to two networks: inference_net and traefik_public.
|
||||||
networks:
|
|
||||||
- inference_net
|
|
||||||
- traefik_public
|
|
||||||
|
|
||||||
# Service for Traefik, a modern HTTP reverse proxy and load balancer.
|
|
||||||
traefik:
|
|
||||||
image: traefik:v2.5
|
|
||||||
command:
|
|
||||||
# Enable the Traefik API dashboard without TLS (not recommended for production).
|
|
||||||
- "--api.insecure=true"
|
|
||||||
# Enable Traefik to use Docker as a provider.
|
|
||||||
- "--providers.docker=true"
|
|
||||||
# Do not expose services by default. Explicitly specify in each service if it should be exposed.
|
|
||||||
- "--providers.docker.exposedbydefault=false"
|
|
||||||
# Specify the default entry point on port 80.
|
|
||||||
- "--entrypoints.web.address=:80"
|
|
||||||
ports:
|
|
||||||
# Map port 80 in the container to port 80 on the host.
|
|
||||||
- "80:80"
|
|
||||||
# Map port 8080 in the container (Traefik's dashboard) to port 8080 on the host.
|
|
||||||
- "8080:8080"
|
|
||||||
# Mount the Docker socket to allow Traefik to listen to Docker's API.
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
# Connect this service to the traefik_public network.
|
|
||||||
networks:
|
networks:
|
||||||
- traefik_public
|
- traefik_public
|
||||||
|
|
||||||
# Define networks used in this docker-compose file.
|
# Define networks used in this docker-compose file.
|
||||||
networks:
|
networks:
|
||||||
# Network for the llm service (used for inference).
|
|
||||||
inference_net:
|
|
||||||
# Public-facing network that Traefik uses. Marked as external to indicate it may be defined outside this file.
|
# Public-facing network that Traefik uses. Marked as external to indicate it may be defined outside this file.
|
||||||
traefik_public:
|
traefik_public:
|
||||||
external: true
|
external: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user