GianmarcoJTA commited on
Commit
59eba05
verified
1 Parent(s): 3920316

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -1,21 +1,23 @@
1
  # Usar una imagen base oficial de Python
2
  FROM python:3.9-slim
3
 
4
- RUN pip install --no-cache-dir tensorflow==2.11.0
5
- RUN pip install --no-cache-dir opencv-python==4.6.0.66
6
- RUN pip install --no-cache-dir gradio==3.0.0
7
- RUN pip install --no-cache-dir numpy==1.23.0
 
 
 
 
8
 
9
  # Establecer el directorio de trabajo
10
  WORKDIR /app
11
 
12
- # Copiar el archivo de tu aplicaci贸n al contenedor
13
  COPY app.py /app/
14
-
15
- # Copiar el archivo requirements.txt si tienes dependencias
16
  COPY requirements.txt /app/
17
 
18
- # Instalar las dependencias
19
  RUN pip install --no-cache-dir -r requirements.txt
20
 
21
  # Exponer el puerto que usar谩 Gradio
@@ -23,4 +25,3 @@ EXPOSE 7860
23
 
24
  # Ejecutar el archivo app.py
25
  CMD ["python", "app.py"]
26
-
 
1
  # Usar una imagen base oficial de Python
2
  FROM python:3.9-slim
3
 
4
+ # Instalar dependencias del sistema necesarias para OpenCV
5
+ RUN apt-get update && apt-get install -y \
6
+ libgl1-mesa-glx \
7
+ libglib2.0-0 \
8
+ libsm6 \
9
+ libxext6 \
10
+ libxrender1 \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
13
  # Establecer el directorio de trabajo
14
  WORKDIR /app
15
 
16
+ # Copiar los archivos al contenedor
17
  COPY app.py /app/
 
 
18
  COPY requirements.txt /app/
19
 
20
+ # Instalar las dependencias de Python
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
  # Exponer el puerto que usar谩 Gradio
 
25
 
26
  # Ejecutar el archivo app.py
27
  CMD ["python", "app.py"]