Spaces:
Sleeping
Sleeping
Fadhili Sumaye
Fix Dockerfile dependencies by replacing obsolete libgl1-mesa-glx with libgl1
6e61656 Download Dockerfile from sumaye/Pest-detection: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/spaces/sumaye/Pest-detection/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/sumaye/Pest-detection/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/sumaye/Pest-detection/resolve/main/Dockerfile
422 Bytes
| FROM python:3.9-slim | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY backend/requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY --chown=user backend/ . | |
| RUN mkdir -p uploads && chown -R user:user /app | |
| ENV PORT=7860 | |
| ENV HOME=/home/user | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |