Spaces:
Paused
Paused
Download Dockerfile from asrarkhann111/linux: direct link, hf CLI and curl.
- Browser
- Download file 1.05 kB
-
https://huggingface.co/spaces/asrarkhann111/linux/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/asrarkhann111/linux/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/asrarkhann111/linux/resolve/main/Dockerfile
1.05 kB
| FROM python:3.9 | |
| USER root | |
| # Install desktop environment, vnc, browser and tools | |
| RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | |
| xfce4 \ | |
| xfce4-terminal \ | |
| xfce4-goodies \ | |
| novnc \ | |
| websockify \ | |
| x11vnc \ | |
| xvfb \ | |
| dbus-x11 \ | |
| firefox-esr \ | |
| curl \ | |
| wget \ | |
| procps \ | |
| net-tools \ | |
| ca-certificates \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Auto-redirect to vnc.html with autoconnect and scaling | |
| RUN echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=vnc.html?autoconnect=true&resize=scale&reconnect=true"></head><body>Redirecting to desktop...</body></html>' > /usr/share/novnc/index.html | |
| # Setup Hugging Face non-root user 'user' | |
| RUN id -u user &>/dev/null || useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| DISPLAY=:1 | |
| WORKDIR $HOME | |
| EXPOSE 7860 | |
| COPY --chown=user:user start.sh /home/user/start.sh | |
| RUN chmod +x /home/user/start.sh | |
| CMD ["/home/user/start.sh"] | |