PGSCOM commited on
Commit
3db37f2
·
verified ·
1 Parent(s): 4407bf2

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10
2
+
3
+ WORKDIR /home/user/app
4
+
5
+ # Instalar dependencias del sistema, reemplazando libgl1-mesa-glx con libgl1
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ git-lfs \
9
+ ffmpeg \
10
+ libsm6 \
11
+ libxext6 \
12
+ cmake \
13
+ rsync \
14
+ libgl1 \
15
+ && rm -rf /var/lib/apt/lists/* \
16
+ && git lfs install
17
+
18
+ # Copiar archivos del proyecto
19
+ COPY --chown=1000:1000 . /home/user/app/
20
+
21
+ # Instalar dependencias de Python
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Crear usuario
25
+ RUN useradd -m -u 1000 user && chown -R user /home/user/app
26
+ USER user
27
+
28
+ # Comando por defecto
29
+ CMD ["python", "hugging_face/app.py"]