File size: 2,043 Bytes
27a27b8
c5204e0
 
 
 
6c54906
c5204e0
 
6c54906
 
 
 
c5204e0
 
 
 
 
 
 
 
6c54906
ea7bf08
 
6c54906
 
 
 
 
 
ea7bf08
6c54906
 
c5204e0
27a27b8
c5204e0
 
 
 
 
 
6c54906
 
c5204e0
6c54906
 
 
c5204e0
27a27b8
c5204e0
 
6c54906
 
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Antigravity FULL VS Code IDE for Hugging Face
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive

# Install core and GUI-support libraries
RUN apt update && \
    apt install -y \
    curl gnupg apt-transport-https ca-certificates python3 \
    libatomic1 libgbm1 libasound2 libxshmfence1 libnss3 libkrb5-3 libonig5 \
    libx11-6 libxkbfile1 \
    git sudo wget sed

# Add Antigravity official repository
RUN mkdir -p /etc/apt/keyrings && \
    curl -fsSL https://us-central1-apt.pkg.dev/doc/repo-signing-key.gpg | \
      gpg --dearmor --yes -o /etc/apt/keyrings/antigravity-repo-key.gpg && \
    echo "deb [signed-by=/etc/apt/keyrings/antigravity-repo-key.gpg] https://us-central1-apt.pkg.dev/projects/antigravity-auto-updater-dev/ antigravity-debian main" | \
      tee /etc/apt/sources.list.d/antigravity.list > /dev/null

# Install Antigravity
RUN apt update && apt install -y antigravity

# FIX: Instead of symlinking to the main script (which causes recursion),
# we will find the real internal binary or use a dummy launcher.
# Often the real binary is inside /usr/lib/antigravity or /opt/antigravity
RUN find / -name "*antigravity*" -type f -executable 2>/dev/null > /home/antigravity_files.txt || true

# We will create a DUMMY tunnel script that doesn't fork bomb
RUN mkdir -p /usr/share/antigravity/bin && \
    echo '#!/bin/bash\nexit 0' > /usr/share/antigravity/bin/antigravity-tunnel && \
    chmod +x /usr/share/antigravity/bin/antigravity-tunnel

# Configure Hugging Face user
RUN useradd -m -u 1000 user && \
    echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER user
ENV HOME=/home/user
WORKDIR /home/user

# Setup workspace and VS Code dirs
RUN mkdir -p /home/user/workspace /home/user/.antigravity-server /home/user/.antigravity-extensions

# Copy and fix the startup script
COPY --chown=user:user run_app.sh /home/user/run_app.sh
RUN chmod +x /home/user/run_app.sh && sed -i 's/\r$//' /home/user/run_app.sh

# Expose port
EXPOSE 7860

# Start via the wrapper script
CMD ["/bin/bash", "/home/user/run_app.sh"]