File size: 695 Bytes
014db75
 
 
 
ec1cc7b
4b265f4
 
ec1cc7b
014db75
 
 
 
 
 
 
 
 
 
ec1cc7b
014db75
 
ec1cc7b
 
 
4b265f4
 
ec1cc7b
014db75
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM python:3.9-slim

WORKDIR /app

# Crear directorios con permisos
RUN mkdir -p /tmp/transformers_cache /tmp/huggingface /tmp/numba_cache && \
    chmod 777 /tmp/transformers_cache /tmp/huggingface /tmp/numba_cache

# Instalar dependencias del sistema
RUN apt-get update && apt-get install -y \
    ffmpeg \
    libsndfile1 \
    && rm -rf /var/lib/apt/lists/*

# Copiar archivos
COPY requirements.txt .
COPY app.py .

# Instalar dependencias
RUN pip install --no-cache-dir -r requirements.txt

# Variables de entorno
ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
ENV HF_HOME=/tmp/huggingface
ENV NUMBA_CACHE_DIR=/tmp/numba_cache
ENV NUMBA_DISABLE_JIT=1

EXPOSE 7860

CMD ["python", "app.py"]