Spaces:
Build error
Build error
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Configure DNS to use Google's public DNS (fixes [Errno -5] on HF Spaces) | |
| RUN echo "nameserver 8.8.8.8\nnameserver 8.8.4.4\nnameserver 1.1.1.1" > /etc/resolv.conf | |
| # Install system dependencies (git for cloning, ffmpeg for audio) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| git \ | |
| ffmpeg \ | |
| dnsutils \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* \ | |
| && apt-get clean | |
| # Clone the repo | |
| RUN git clone https://github.com/Ranjan-Shettigar/YTAV.git /app | |
| # Install dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Expose FastAPI port | |
| EXPOSE 5000 | |
| # Run the app with Uvicorn | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"] | |