Spaces:
Runtime error
Runtime error
| FROM python:3.10 | |
| # Install system dependencies (ffmpeg is required for audio conversions) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Copy requirements file first to utilize Docker cache | |
| COPY requirements.txt . | |
| # Install Python packages (fixes openai-whisper pkg_resources build error) | |
| RUN pip install --no-cache-dir --upgrade pip | |
| RUN pip install --no-cache-dir setuptools==69.5.1 wheel numpy==1.26.4 | |
| RUN pip install --no-cache-dir --no-build-isolation openai-whisper==20231117 | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| # Expose port 7860 for Hugging Face Spaces | |
| EXPOSE 7860 | |
| # Start FastAPI application on port 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] |