Spaces:
Runtime error
Runtime error
File size: 906 Bytes
c236cb2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | # Use Python 3.11 slim image
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
g++ \
&& rm -rf /var/lib/apt/lists/*
# Copy full requirements for all integrations
COPY requirements.txt ./requirements.txt
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend code
COPY backend/ ./backend/
# Copy frontend assets
COPY frontend/ ./frontend/
# Note: `aiofiles` is included in requirements.txt, no separate install needed
# Create a combined FastAPI app that serves both API and frontend
COPY app.py .
# Expose port (Hugging Face Spaces will set PORT environment variable)
EXPOSE 7860
# Set environment variables
ENV PYTHONPATH=/app
ENV DATABASE_URL=sqlite:///./chefcode.db
# Run the application
CMD ["python", "app.py"]
|