File size: 560 Bytes
3315573 097bd37 3315573 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
FROM python:3.9-slim
WORKDIR /app
# Instalar unzip
RUN apt-get update && apt-get install -y unzip
# Copiar ZIP e descompactar diretamente na pasta correta
COPY random_xrays.zip .
RUN unzip random_xrays.zip && rm random_xrays.zip
# Copiar requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Instalar Gunicorn
RUN pip install gunicorn
# Copiar restante código
COPY . .
RUN chmod 644 /app/modelo_raiox.keras
# Expor porta usada pelo Hugging Face (7860)
EXPOSE 7860
CMD ["gunicorn", "-b", "0.0.0.0:7860", "app:app"]
|