File size: 723 Bytes
193ce8b ba3f1fd 193ce8b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | FROM archlinux:latest
# 1. Update system and install XFCE Desktop, VNC, and noVNC
RUN pacman -Syu --noconfirm && \
pacman -S --noconfirm \
xfce4 \
xfce4-goodies \
xvfb \
x11vnc \
novnc \
firefox \
sudo \
bash
# 2. Setup a non-root user (Hugging Face requirement)
RUN useradd -m -u 1000 user && \
echo "user ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER user
ENV HOME=/home/user
WORKDIR $HOME
# 3. Copy our startup script into the container
COPY --chown=user:user entrypoint.sh /home/user/entrypoint.sh
RUN chmod +x /home/user/entrypoint.sh
# 4. Hugging Face Spaces always look at port 7860
EXPOSE 7860
# 5. Start the computer simulation
ENTRYPOINT ["/home/user/entrypoint.sh"]
|