audio_texto_XD / Dockerfile
JairoDanielMT's picture
Update Dockerfile
79d058c verified
raw
history blame
No virus
1.15 kB
# Etapa 1: Instalaci贸n de dependencias de Python y construcci贸n de la aplicaci贸n
FROM python:3.10 AS builder
# Copiar archivos de la aplicaci贸n
WORKDIR /app
COPY . .
# Instalar dependencias de Python
RUN pip install --no-cache-dir pandas numpy nltk moviepy pydub transformers pydantic pytest fastapi uvicorn torch torchvision torchaudio
# Instalar paquete especial whisperx desde GitHub
RUN pip install git+https://github.com/m-bain/whisperx.git
# Instalar dependencias desde requirements.txt
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Etapa 2: Agregar componentes espec铆ficos de CUDA y utilidades b谩sicas
FROM nvidia/cuda:11.3.1-base-ubuntu20.04 AS final
# Instalar utilidades b谩sicas
RUN apt-get update && apt-get install -y \
curl \
git \
unzip \
wget \
zip \
git-lfs \
ffmpeg
# Copiar la aplicaci贸n desde la etapa anterior
WORKDIR /app
COPY --from=builder /app .
# Cambiar permisos de archivos necesarios
RUN chmod -R 777 /app
# Definir comando predeterminado para iniciar la aplicaci贸n
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]