Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +3 -9
Dockerfile
CHANGED
|
@@ -3,24 +3,18 @@ FROM python:3.10-slim
|
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
-
#
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
-
|
| 9 |
rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Copiar requirements.txt primero para cachear la instalaci贸n
|
| 12 |
COPY requirements.txt .
|
| 13 |
|
| 14 |
-
#
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
# Verificar que gradio est茅 en requirements.txt, si no, instalarlo expl铆citamente
|
| 18 |
-
RUN pip install --no-cache-dir gradio fastapi uvicorn
|
| 19 |
-
|
| 20 |
-
# Copiar el resto de los archivos
|
| 21 |
COPY . .
|
| 22 |
|
| 23 |
EXPOSE 7860
|
| 24 |
|
| 25 |
-
# Cambiar el comando para ejecutar la aplicaci贸n FastAPI con Gradio
|
| 26 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 3 |
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Instala solo las dependencias m铆nimas necesarias
|
| 7 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 8 |
+
libgl1 && \
|
| 9 |
rm -rf /var/lib/apt/lists/*
|
| 10 |
|
|
|
|
| 11 |
COPY requirements.txt .
|
| 12 |
|
| 13 |
+
# Instala dependencias (aseg煤rate que gradio est谩 en requirements.txt)
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
EXPOSE 7860
|
| 19 |
|
|
|
|
| 20 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|