Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Install system dependencies (needed for some python packages) | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy the rest of the app | |
| COPY . . | |
| # Create the database file if it doesn't exist (permission fix) | |
| RUN touch food_logs.db && chmod 777 food_logs.db | |
| # Expose the Hugging Face port | |
| EXPOSE 7860 | |
| # Run the app | |
| CMD ["python", "app.py"] |