You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

28 rivejä
807 B

  1. FROM python:3.10-slim
  2. ENV PYTHONUNBUFFERED=1
  3. ENV PYTHONDONTWRITEBYTECODE=1
  4. # Installiamo libgomp1, mosquitto-clients e coreutils (per stdbuf)
  5. RUN apt-get update && apt-get install -y --no-install-recommends \
  6. libgomp1 \
  7. mosquitto-clients \
  8. coreutils \
  9. && rm -rf /var/lib/apt/lists/*
  10. WORKDIR /app
  11. # Copia e installazione in un unico step per ridurre i layer
  12. COPY requirements.txt .
  13. RUN pip install --no-cache-dir --upgrade pip && \
  14. pip install --no-cache-dir -r requirements.txt
  15. # Copia del resto dell'applicazione
  16. COPY app/ /app/app/
  17. COPY entrypoint.sh /app/entrypoint.sh
  18. RUN chmod +x /app/entrypoint.sh
  19. # Setup permessi (manteniamo root per l'esecuzione dello script di boot e accesso a /tmp)
  20. RUN mkdir -p /data/config /data/mqtt_raw /data/model
  21. ENTRYPOINT ["/app/entrypoint.sh"]