YellowAlberto commited on
Commit
f797316
·
verified ·
1 Parent(s): ab13602

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +21 -29
Dockerfile CHANGED
@@ -1,30 +1,22 @@
1
- # Usamos una imagen de Python ligera
2
- FROM python:3.10-slim
3
-
4
- # Instalamos librerías del sistema necesarias para OpenCV y ONNX
5
- RUN apt-get update && apt-get install -y \
6
- libgl1-mesa-glx \
7
- libglib2.0-0 \
8
- && rm -rf /var/lib/apt/lists/*
9
-
10
- # Directorio de trabajo
11
- WORKDIR /app
12
-
13
- # Copiamos e instalamos dependencias
14
- COPY requirements.txt .
15
- RUN pip install --no-cache-dir -r requirements.txt
16
-
17
- # Copiamos todo el código del proyecto
18
- COPY . .
19
-
20
- # Creamos la carpeta de imágenes si no existe y damos permisos
21
- RUN mkdir -p imagenes_subidas && chmod 777 imagenes_subidas
22
-
23
- # Damos permisos de ejecución al script de inicio
24
- RUN chmod +x run.sh
25
-
26
- # Exponemos el puerto de Gradio (Hugging Face suele usar el 7860)
27
- EXPOSE 7860
28
-
29
- # Ejecutamos el script de inicio
30
  CMD ["./run.sh"]
 
1
+ # Usamos una imagen de Python estable
2
+ FROM python:3.10-slim
3
+
4
+ # Instalamos las dependencias actualizadas para OpenCV y ONNX
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1 \
7
+ libglib2.0-0 \
8
+ libsm6 \
9
+ libxext6 \
10
+ libxrender-dev \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ WORKDIR /app
14
+
15
+ # El resto del archivo se mantiene igual...
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+ COPY . .
19
+ RUN mkdir -p imagenes_subidas && chmod 777 imagenes_subidas
20
+ RUN chmod +x run.sh
21
+ EXPOSE 7860
 
 
 
 
 
 
 
 
22
  CMD ["./run.sh"]