Spaces:
Sleeping
Sleeping
File size: 572 Bytes
d801307 4c96781 d801307 4c96781 d801307 100c6cd d801307 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y gcc g++ && rm -rf /var/lib/apt/lists/*
# Copy the entire project first to avoid path resolution issues in Render's builder
COPY . /app
# Install dependencies from the copied backend folder
RUN pip install --no-cache-dir -r backend/requirements.txt
# Set environment variables (7860 is required by Hugging Face Spaces by default)
ENV PORT=7860
# Run the unified backend application
CMD ["sh", "-c", "uvicorn backend.app.main:app --host 0.0.0.0 --port ${PORT}"]
|