Spaces:
Sleeping
Sleeping
| FROM python:3.12 | |
| # Install system dependencies | |
| RUN apt-get update -q \ | |
| && apt-get install -qy --no-install-recommends wget git libopencv-dev python3-opencv \ | |
| && apt-get autoremove -y \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up cache permissions | |
| RUN mkdir -p /.cache && chmod -R 777 /.cache | |
| # Set working directory | |
| WORKDIR /data/app | |
| # Copy requirements and install dependencies | |
| COPY requirements.txt ./ | |
| RUN pip install --upgrade pip \ | |
| && pip install -r requirements.txt \ | |
| && pip install --no-cache-dir opencv-python-headless | |
| # Copy application code | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run application | |
| CMD ["python", "/data/app/app.py"] | |