Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

34 lignes
955 B

  1. FROM python:3.10-slim
  2. ENV PYTHONUNBUFFERED=1
  3. # dipendenze native utili a numpy/scikit (safe choice)
  4. RUN apt-get update && apt-get install -y --no-install-recommends \
  5. build-essential gcc g++ \
  6. && rm -rf /var/lib/apt/lists/*
  7. WORKDIR /app
  8. COPY requirements.txt /app/requirements.txt
  9. RUN pip install --no-cache-dir -r /app/requirements.txt
  10. # Correzione nome pacchetto e upgrade pip
  11. RUN pip install --no-cache-dir --upgrade pip
  12. RUN pip install streamlit==1.29.0 streamlit-drawable-canvas==0.9.3 PyYAML Pillow pandas
  13. RUN pip install --no-cache-dir folium streamlit-folium
  14. RUN pip install --no-cache-dir psutil
  15. COPY app/ /app/app/
  16. COPY entrypoint.sh /app/entrypoint.sh
  17. RUN chmod +x /app/entrypoint.sh
  18. # utente non-root
  19. RUN useradd -m appuser
  20. USER appuser
  21. # cartelle dati/modelli (volumi)
  22. RUN mkdir -p /home/appuser/data /home/appuser/models
  23. ENV DATA_DIR=/home/appuser/data
  24. ENV MODELS_DIR=/home/appuser/models
  25. ENTRYPOINT ["/app/entrypoint.sh"]