Spaces:
Runtime error
Runtime error
Download Dockerfile from Janeka/background-remover: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/spaces/Janeka/background-remover/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Janeka/background-remover/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Janeka/background-remover/resolve/main/Dockerfile
556 Bytes
| FROM python:3.9-slim | |
| WORKDIR /app | |
| COPY . . | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Configure Numba cache | |
| ENV NUMBA_CACHE_DIR=/tmp/numba_cache | |
| RUN mkdir -p ${NUMBA_CACHE_DIR} && chmod 777 ${NUMBA_CACHE_DIR} | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Create non-root user and set permissions | |
| RUN useradd -m appuser && \ | |
| chown -R appuser /app && \ | |
| chown -R appuser ${NUMBA_CACHE_DIR} | |
| USER appuser | |
| CMD ["python", "app.py"] |