Download Dockerfile from runitx/test: direct link, hf CLI and curl.
- Browser
- Download file 853 Bytes
-
https://huggingface.co/spaces/runitx/test/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/runitx/test/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/runitx/test/resolve/main/Dockerfile
853 Bytes
| # 1. Use the official Devuan stable base image | |
| FROM devuan/devuan:stable | |
| # 2. Install Python 3, tmate, and other required tools via apt | |
| RUN apt-get update && apt-get install -y \ | |
| python3 \ | |
| python3-pip \ | |
| tmate \ | |
| openssh-client \ | |
| curl \ | |
| git \ | |
| sudo \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 3. Configure unprivileged user permissions for UID 1000 | |
| RUN useradd -m -u 1000 user && \ | |
| echo "user ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \ | |
| chmod 0440 /etc/sudoers.d/user | |
| USER user | |
| ENV HOME=/home/user | |
| WORKDIR /home/user/app | |
| # 4. Pre-generate SSH keys for your user space | |
| RUN mkdir -p /home/user/.ssh && chmod 700 /home/user/.ssh && \ | |
| ssh-keygen -t ed25519 -N "" -f /home/user/.ssh/id_ed25519 | |
| COPY --chown=user . . | |
| RUN cp .tmate.conf /home/user/.tmate.conf | |
| RUN chmod +x start.sh | |
| EXPOSE 7860 | |
| CMD ["./start.sh"] | |