feat: Add new API endpoints and HTML pages for ML model management
- Implemented HTML pages for datasets, models, training, testing, and results. - Created API endpoints for managing repositories, results, tests, and training sessions. - Added functionality for streaming training progress via Server-Sent Events (SSE). - Introduced a Dockerfile for the ML runner with necessary dependencies. - Developed an SDK for user code execution within the runner container. - Enhanced CSS styles for improved UI layout and navigation. - Established a layout template for consistent HTML structure across pages. - Added JavaScript for dynamic interactions on the models page. - Implemented WebSocket handling for real-time communication with kiosk devices and controllers. - Implemented model registration and management API at /api/models - Added Gitea proxy API for repository interactions at /api/repos - Created results API for listing and comparing training results at /api/results - Developed training management API for enqueueing and retrieving training jobs at /api/trainings - Introduced SSE endpoint for live training progress updates - Added HTML pages for models, datasets, and training management - Created a Dockerfile for the ML runner with necessary dependencies - Developed SDK for user code execution within the runner container - Enhanced CSS styles for improved UI/UX - Implemented WebSocket communication for real-time device and controller interactions in the kiosk system
This commit is contained in:
@@ -106,8 +106,12 @@ services:
|
||||
context: ./ml
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
command: uvicorn main:app --host 0.0.0.0 --port 3007 --reload
|
||||
volumes:
|
||||
- ./ml:/app
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ml_tmp:/var/ml/tmp
|
||||
- ml_gitcache:/var/ml/gitcache
|
||||
env_file:
|
||||
- ./ml/.env
|
||||
networks:
|
||||
@@ -117,34 +121,43 @@ services:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.ml.rule=Host(`ml.${DOMAIN:-mebboat.it}`)"
|
||||
- "traefik.http.routers.ml.entrypoints=websecure"
|
||||
- "traefik.http.services.ml.loadbalancer.server.port=8000"
|
||||
- "traefik.http.services.ml.loadbalancer.server.port=3007"
|
||||
- "traefik.http.routers.ml.tls.certresolver=letsencrypt"
|
||||
- "traefik.docker.network=meb-public"
|
||||
|
||||
# marine:
|
||||
# container_name: marine-service
|
||||
# build:
|
||||
# context: ./marine
|
||||
# dockerfile: Dockerfile
|
||||
# restart: unless-stopped
|
||||
# volumes:
|
||||
# - ./marine:/app
|
||||
# env_file:
|
||||
# - ./marine/.env
|
||||
# environment:
|
||||
# - REDIS_HOST=meb-redis
|
||||
# - REDIS_PORT=6379
|
||||
# networks:
|
||||
# - meb-proxy-net
|
||||
# - meb-internal
|
||||
# labels:
|
||||
# - "traefik.enable=true"
|
||||
# - "traefik.http.routers.marine.rule=Host(`api.${DOMAIN:-mebboat.it}`) && PathPrefix(`/marine`)"
|
||||
# - "traefik.http.routers.marine.entrypoints=web"
|
||||
# - "traefik.http.services.marine.loadbalancer.server.port=8001"
|
||||
# - "traefik.docker.network=meb-proxy-net"
|
||||
# - "traefik.http.middlewares.marine-strip.stripprefix.prefixes=/marine"
|
||||
# - "traefik.http.routers.marine.middlewares=marine-strip"
|
||||
copernicus:
|
||||
container_name: copernicus-service
|
||||
build:
|
||||
context: ./copernicus
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./copernicus:/app
|
||||
- copernicus_cache:/app/cache
|
||||
env_file:
|
||||
- ./copernicus/.env
|
||||
environment:
|
||||
- REDIS_HOST=meb-redis
|
||||
- REDIS_PORT=6379
|
||||
- API_SERVICE_URL=http://api:3003
|
||||
- CACHE_DIR=/app/cache
|
||||
- MINIO_ENDPOINT=minio
|
||||
- MINIO_PORT=9000
|
||||
networks:
|
||||
- meb-public
|
||||
- meb-private
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
# Esponi sotto api.mebboat.it/marine/* (Traefik strippa "/marine")
|
||||
- "traefik.http.routers.copernicus.rule=Host(`api.${DOMAIN:-mebboat.it}`) && PathPrefix(`/marine`)"
|
||||
- "traefik.http.routers.copernicus.entrypoints=websecure"
|
||||
- "traefik.http.routers.copernicus.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.copernicus.loadbalancer.server.port=8000"
|
||||
- "traefik.docker.network=meb-public"
|
||||
- "traefik.http.middlewares.copernicus-strip.stripprefix.prefixes=/marine"
|
||||
- "traefik.http.routers.copernicus.middlewares=copernicus-strip"
|
||||
# Priorità alta: la regola col PathPrefix deve vincere su quella generica api.
|
||||
- "traefik.http.routers.copernicus.priority=100"
|
||||
|
||||
# circuits:
|
||||
# container_name: meb-circuits
|
||||
@@ -184,3 +197,8 @@ networks:
|
||||
external: true
|
||||
meb-private:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
copernicus_cache:
|
||||
ml_tmp:
|
||||
ml_gitcache:
|
||||
|
||||
Reference in New Issue
Block a user