Spaces:
Sleeping
Sleeping
| # Updated 2024-02-09 16:45 | |
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| libsm6 \ | |
| libxext6 \ | |
| libxrender1 \ | |
| libgomp1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir --upgrade pip setuptools wheel | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application files | |
| COPY . . | |
| # Create necessary directories | |
| RUN mkdir -p data/input_data | |
| # Expose port | |
| EXPOSE 7860 | |
| # Set environment variables | |
| ENV FLASK_APP=app.py | |
| ENV PYTHONUNBUFFERED=1 | |
| # Run the Flask app | |
| CMD ["python", "app.py"] |