File size: 857 Bytes
2db7984
11fc474
 
 
2db7984
 
 
 
11fc474
2db7984
11fc474
2db7984
11fc474
2db7984
 
11fc474
b0c09dd
 
11fc474
a61fccf
 
11fc474
a61fccf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM python:3.12-slim            

WORKDIR /app

# Dipendenze di sistema minime (aggiungi qui se te ne servono altre)
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential curl git && \
    rm -rf /var/lib/apt/lists/*

# Copia dei requisiti PRIMA del codice per sfruttare la cache Docker
COPY requirements.txt ./
RUN pip3 install --no-cache-dir -r requirements.txt

# Copia del codice
COPY src/ ./src/

ENV PORT=7860
EXPOSE 7860

# HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=5 \
#   CMD curl -f http://localhost:${PORT}/_stcore/health || curl -f http://localhost:${PORT}/ || exit 1

ENTRYPOINT ["sh", "-c", "echo PORT=${PORT} && streamlit run src/streamlit_app.py --server.port=${PORT} --server.address=0.0.0.0 --server.enableCORS=false --server.enableXsrfProtection=false --server.headless=true"]