RetinAI / Dockerfile
ViannyCruz's picture
Update Dockerfile
871dd24 verified
Raw
History Blame
710 Bytes
FROM python:3.10-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
TF_CPP_MIN_LOG_LEVEL=2 \
DB_PATH=/data/medical_app.db \
PORT=7860
RUN apt-get update && apt-get install -y --no-install-recommends \
libgl1 \
libglib2.0-0 \
libsm6 \
libxrender1 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY app.py .
COPY database.py .
COPY web/ ./web/
COPY *.h5 ./
RUN mkdir -p /data && chmod 777 /data
EXPOSE 7860
# timeout=600 para dar tiempo a TensorFlow de cargar
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--timeout", "600", "app:app"]