Spaces:
Build error
Build error
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the code | |
| COPY . . | |
| # Create necessary directories if they don't exist | |
| RUN mkdir -p static | |
| # Make port 7860 available (Hugging Face Spaces uses this port) | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=7860 | |
| # Run the application | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |