Download Dockerfile from Nymbo/utils: direct link, hf CLI and curl.
- Browser
- Download file 809 Bytes
-
https://huggingface.co/spaces/Nymbo/utils/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Nymbo/utils/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Nymbo/utils/resolve/main/Dockerfile
809 Bytes
| FROM python:3.12-slim-bookworm | |
| WORKDIR /app | |
| COPY packages.txt /tmp/packages.txt | |
| RUN apt-get update && \ | |
| xargs -r -a /tmp/packages.txt apt-get install -y --no-install-recommends && \ | |
| rm -rf /var/lib/apt/lists/* && apt-get clean | |
| COPY requirements.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt | |
| # Set up a new user named "user" with user ID 1000 | |
| RUN useradd -m -u 1000 user | |
| # Switch to the "user" user | |
| USER user | |
| # Set home to the user's home directory | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Set the working directory to the user's home directory | |
| WORKDIR $HOME/app | |
| # Copy the current directory contents into the container at $HOME/app setting the owner to the user | |
| COPY --chown=user . $HOME/app | |
| EXPOSE 7860 | |
| CMD ["python","app.py"] | |