Spaces:
Build error
Build error
Upload Dockerfile
Browse files- Dockerfile +3 -10
Dockerfile
CHANGED
|
@@ -1,24 +1,17 @@
|
|
| 1 |
-
# Define a imagem base do Python
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# Define o diret贸rio de trabalho dentro do container
|
| 5 |
WORKDIR /code
|
| 6 |
|
| 7 |
-
# Exp玫e a porta que o Hugging Face espera
|
| 8 |
EXPOSE 7860
|
| 9 |
|
| 10 |
-
# Define vari谩veis de ambiente para o servidor Gunicorn
|
| 11 |
ENV PYTHONDONTWRITEBYTECODE 1
|
| 12 |
ENV PYTHONUNBUFFERED 1
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
COPY requirements.txt .
|
| 16 |
|
| 17 |
-
# Instala as depend锚ncias
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
-
# Copia todos os outros arquivos do projeto (app.py, index.html, etc.)
|
| 21 |
COPY . .
|
| 22 |
-
|
| 23 |
-
# Comando para iniciar o servidor web (Gunicorn)
|
| 24 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "8", "--timeout", "0", "app:app"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /code
|
| 4 |
|
|
|
|
| 5 |
EXPOSE 7860
|
| 6 |
|
|
|
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE 1
|
| 8 |
ENV PYTHONUNBUFFERED 1
|
| 9 |
|
| 10 |
+
RUN apt-get update && apt-get install -y --no-install-recommends build-essential
|
| 11 |
+
|
| 12 |
COPY requirements.txt .
|
| 13 |
|
|
|
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
|
|
|
| 16 |
COPY . .
|
| 17 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "8", "--timeout", "0", "app:app"]
|
|
|
|
|
|