Spaces:
Paused
Paused
Download Dockerfile from alphg/cybertool-api: direct link, hf CLI and curl.
- Browser
- Download file 650 Bytes
-
https://huggingface.co/spaces/alphg/cybertool-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/alphg/cybertool-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/alphg/cybertool-api/resolve/main/Dockerfile
650 Bytes
| FROM python:3.12-slim | |
| # Create non-root user | |
| RUN useradd -m -s /bin/bash user | |
| # Install system dependencies as root | |
| RUN apt-get update && \ | |
| apt-get install -y libreoffice ffmpeg && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Switch to non-root user AFTER installing system packages | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user ./ $HOME/app | |
| # Install Python dependencies as non-root | |
| RUN pip install --trusted-host pypi.python.org -r requirements.txt | |
| EXPOSE 7860 | |
| ENV NAME World | |
| ENV NUMBA_CACHE_DIR=/tmp/numba_cache | |
| ENV NUMBA_DISABLE_JIT=0 | |
| CMD ["python", "app.py"] | |