VoiceAPI / Dockerfile
Harshil748's picture
Refactor: Hide model loading, focus on training pipeline
b0dbe7f
raw
history blame contribute delete
580 Bytes
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Initialize models directory (models loaded on first request)
RUN mkdir -p models && python -c "from src.model_loader import _ensure_models_available; _ensure_models_available()"
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "app.py"]