# Dockerfile for Antigravity Server on Hugging Face Spaces # This version uses the native Web Server mode (No VNC needed!) FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # 1. Install System Dependencies RUN apt-get update && apt-get install -y \ wget \ curl \ git \ sudo \ libnss3 \ libatk1.3-0 \ libatk-bridge2.0-0 \ libcups2 \ libdrm2 \ libgbm1 \ libasound2 \ && rm -rf /var/lib/apt/lists/* # 2. Setup User RUN useradd -m -u 1000 user && \ echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers USER user ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME # 3. Install Antigravity IDE # IMPORTANT: This assumes you have uploaded 'antigravity-linux.deb' to the Space COPY --chown=user antigravity-linux.deb /home/user/antigravity.deb RUN sudo apt-get update && \ sudo apt-get install -y ./antigravity.deb && \ sudo rm antigravity.deb # 4. Copy Start Script COPY --chown=user start.sh /home/user/start.sh RUN chmod +x /home/user/start.sh # Hugging Face Spaces use port 7860 EXPOSE 7860 CMD ["/home/user/start.sh"]