EF / Dockerfile
alonb19's picture
Update Dockerfile
4b265f4 verified
raw
history blame contribute delete
695 Bytes
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"]