Spaces:
Build error
Build error
File size: 888 Bytes
583e46a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # Docker Compose for Cattle Breed Classifier
# Run: docker-compose up --build
version: "3.9"
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
container_name: cattle-api
ports:
- "8000:8000"
environment:
- MODEL_PATH=/app/models/vit_best.pth
- METADATA_PATH=/app/data/breed_metadata.csv
- CLASSES_PATH=/app/models/classes.txt
- MODEL_NAME=vit
- MODEL_VERSION=v2.0
volumes:
- ./models:/app/models
- ./data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: cattle-frontend
ports:
- "3000:80"
depends_on:
- backend
restart: unless-stopped
|