Download Dockerfile from jebin2/comic-panel-extractor: direct link, hf CLI and curl.
- Browser
- Download file 816 Bytes
-
https://huggingface.co/spaces/jebin2/comic-panel-extractor/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/jebin2/comic-panel-extractor/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/jebin2/comic-panel-extractor/resolve/main/Dockerfile
816 Bytes
| # Use official Python image | |
| FROM python:3.10-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create user (Hugging Face Spaces requirement) | |
| RUN useradd -m -u 1000 user | |
| # Switch to user early | |
| USER user | |
| # Set working directory | |
| WORKDIR /home/user/app | |
| # Set environment variables for Hugging Face Spaces | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| BASE_PATH=/home/user/app \ | |
| IS_DOCKER=True \ | |
| SERVER_PORT=7860 | |
| # COPY --chown=user requirements.txt . | |
| # RUN pip install --no-cache-dir --user -r requirements.txt | |
| # Copy app code | |
| COPY --chown=user . . | |
| # Install the package from the current directory | |
| RUN pip install --no-cache-dir --user . | |
| # Entry point | |
| CMD ["serve-comic-panel-extractor"] |