Darveht commited on
Commit
ea258a3
verified
1 Parent(s): 2457274

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -0
Dockerfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Instalar dependencias del sistema
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg \
6
+ git \
7
+ git-lfs \
8
+ build-essential \
9
+ python3-dev \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Configurar directorio de trabajo
13
+ WORKDIR /app
14
+
15
+ # Copiar archivos de requisitos
16
+ COPY requirements.txt .
17
+
18
+ # Instalar dependencias de Python
19
+ RUN pip install --no-cache-dir -r requirements.txt
20
+
21
+ # Descargar modelos de spaCy
22
+ RUN python -m spacy download en_core_web_sm
23
+ RUN python -m spacy download es_core_news_sm
24
+
25
+ # Descargar datos de NLTK
26
+ RUN python -c "import nltk; nltk.download('punkt'); nltk.download('stopwords'); nltk.download('vader_lexicon')"
27
+
28
+ # Copiar c贸digo de la aplicaci贸n
29
+ COPY . .
30
+
31
+ # Crear directorios necesarios
32
+ RUN mkdir -p /app/.zenvision/cache /app/.zenvision/models /tmp/zenvision
33
+
34
+ # Exponer puerto
35
+ EXPOSE 7860
36
+
37
+ # Variables de entorno
38
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
39
+ ENV GRADIO_SERVER_PORT=7860
40
+
41
+ # Comando de inicio
42
+ CMD ["python", "app.py"]