Files
upo-app-agents/Dockerfile
Berack96 3e746cdd45 Fixed Docker
- Update Dockerfile, docker-compose
- fixed app instructions not working
- fixed json ouput sanification
- added tests for predictor
2025-09-26 12:45:05 +02:00

24 lines
802 B
Docker

# Vogliamo usare una versione di linux leggera con già uv installato
# Infatti scegliamo l'immagine ufficiale di uv che ha già tutto configurato
FROM ghcr.io/astral-sh/uv:python3.12-alpine
# Dopo aver definito la workdir mi trovo già in essa
WORKDIR /app
# Settiamo variabili d'ambiente per usare python del sistema invece che venv
ENV UV_PROJECT_ENVIRONMENT=/usr/local
ENV UV_LINK_MODE=copy
# Copiamo prima i file di configurazione delle dipendenze e installiamo le dipendenze
COPY pyproject.toml ./
COPY uv.lock ./
RUN uv sync --frozen --no-cache
# Copiamo i file sorgente dopo aver installato le dipendenze per sfruttare la cache di Docker
COPY LICENSE .
COPY src ./src
# Comando di default all'avvio dell'applicazione
CMD ["echo", "Benvenuto in UPO AppAI!"]
CMD ["uv", "run", "src/app.py"]