cobramv12 commited on
Commit
14a99ba
verified
1 Parent(s): 322ca1f

Switch to Docker (Python 3.10) for ultimate stability

Browse files
Files changed (1) hide show
  1. Dockerfile +19 -20
Dockerfile CHANGED
@@ -1,31 +1,30 @@
1
- FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime
2
-
3
- ENV DEBIAN_FRONTEND=noninteractive
4
- ENV PYTHONUNBUFFERED=1
5
 
 
6
  RUN apt-get update && apt-get install -y \
7
- git wget curl libgl1 libglib2.0-0 \
 
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- WORKDIR /app
11
-
12
- # Instalar ComfyUI
13
- RUN git clone https://github.com/comfyanonymous/ComfyUI.git /app/ComfyUI
14
 
15
- WORKDIR /app/ComfyUI
16
 
 
 
17
  RUN pip install --no-cache-dir -r requirements.txt
18
- RUN pip install --no-cache-dir \
19
- xformers \
20
- huggingface_hub
21
-
22
- # Crear directorios de modelos
23
- RUN mkdir -p models/checkpoints models/loras models/vae models/clip models/unet models/controlnet
24
 
25
- # Script de inicio
26
- COPY start.sh /app/start.sh
27
- RUN chmod +x /app/start.sh
28
 
 
29
  EXPOSE 7860
30
 
31
- CMD ["/app/start.sh"]
 
 
1
+ # Usamos Python 3.10 que es el est谩ndar m谩s estable para IA
2
+ FROM python:3.10-slim
 
 
3
 
4
+ # Instalamos dependencias del sistema (FFMPEG para video y herramientas de compilaci贸n)
5
  RUN apt-get update && apt-get install -y \
6
+ ffmpeg \
7
+ libsm6 \
8
+ libxext6 \
9
+ git \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Creamos un usuario para Hugging Face (requerido por seguridad)
13
+ RUN useradd -m -u 1000 user
14
+ USER user
15
+ ENV PATH="/home/user/.local/bin:${PATH}"
16
 
17
+ WORKDIR /app
18
 
19
+ # Copiamos e instalamos requerimientos
20
+ COPY --chown=user requirements.txt .
21
  RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
22
 
23
+ # Copiamos el c贸digo de la aplicaci贸n
24
+ COPY --chown=user . .
 
25
 
26
+ # Exponemos el puerto de Gradio
27
  EXPOSE 7860
28
 
29
+ # Comando para arrancar
30
+ CMD ["python", "app.py"]