AZILS commited on
Commit
27a27b8
·
verified ·
1 Parent(s): b4733fd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -19
Dockerfile CHANGED
@@ -1,10 +1,9 @@
1
- # Antigravity VS Code Sandbox for Hugging Face Spaces
2
  FROM ubuntu:22.04
3
 
4
- # Prevent interactive prompts during installation
5
  ENV DEBIAN_FRONTEND=noninteractive
6
 
7
- # Install core dependencies and libraries required for VS Code server
8
  RUN apt update && \
9
  apt install -y \
10
  curl \
@@ -12,13 +11,14 @@ RUN apt update && \
12
  apt-transport-https \
13
  ca-certificates \
14
  python3 \
15
- python3-pip \
16
  libatomic1 \
17
  libgbm1 \
18
  libasound2 \
 
 
19
  git \
20
  sudo \
21
- sed
22
 
23
  # Add Antigravity official repository
24
  RUN mkdir -p /etc/apt/keyrings && \
@@ -27,33 +27,27 @@ RUN mkdir -p /etc/apt/keyrings && \
27
  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" | \
28
  tee /etc/apt/sources.list.d/antigravity.list > /dev/null
29
 
30
- # Install the Antigravity package
31
  RUN apt update && \
32
  apt install -y antigravity
33
 
34
- # Configure a non-root user for security (Hugging Face standard)
35
  RUN useradd -m -u 1000 user && \
36
  echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
37
  USER user
38
  ENV HOME=/home/user
39
  WORKDIR /home/user
40
 
41
- # Setup directories for VS Code data
42
  RUN mkdir -p /home/user/.antigravity-server /home/user/.antigravity-extensions
43
 
44
- # Copy the startup script
45
- COPY --chown=user:user run_app.sh /home/user/run_app.sh
46
-
47
- # Fix line endings and permissions
48
- RUN chmod +x /home/user/run_app.sh && \
49
- sed -i 's/\r$//' /home/user/run_app.sh
50
-
51
  # Set environment variables
52
  ENV PORT=7860
53
- ENV PATH="/home/user/.local/bin:${PATH}"
54
 
55
- # Expose the default Hugging Face port
56
  EXPOSE 7860
57
 
58
- # Start the application using bash explicitly
59
- CMD ["/bin/bash", "/home/user/run_app.sh"]
 
 
 
1
+ # Antigravity FULL VS Code IDE for Hugging Face
2
  FROM ubuntu:22.04
3
 
 
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # Install all required libraries for VS Code Web
7
  RUN apt update && \
8
  apt install -y \
9
  curl \
 
11
  apt-transport-https \
12
  ca-certificates \
13
  python3 \
 
14
  libatomic1 \
15
  libgbm1 \
16
  libasound2 \
17
+ libxshmfence1 \
18
+ libnss3 \
19
  git \
20
  sudo \
21
+ wget
22
 
23
  # Add Antigravity official repository
24
  RUN mkdir -p /etc/apt/keyrings && \
 
27
  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" | \
28
  tee /etc/apt/sources.list.d/antigravity.list > /dev/null
29
 
30
+ # Install FULL Antigravity suite
31
  RUN apt update && \
32
  apt install -y antigravity
33
 
34
+ # Configure Hugging Face user
35
  RUN useradd -m -u 1000 user && \
36
  echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
37
  USER user
38
  ENV HOME=/home/user
39
  WORKDIR /home/user
40
 
41
+ # Create needed directories
42
  RUN mkdir -p /home/user/.antigravity-server /home/user/.antigravity-extensions
43
 
 
 
 
 
 
 
 
44
  # Set environment variables
45
  ENV PORT=7860
 
46
 
47
+ # Expose port
48
  EXPOSE 7860
49
 
50
+ # Start the REAL VS Code Web Server
51
+ # We use --host 0.0.0.0 and --port 7860 for Hugging Face
52
+ # We use --without-connection-token to bypass the login screen
53
+ CMD ["antigravity", "serve-web", "--host", "0.0.0.0", "--port", "7860", "--accept-server-license-terms", "--without-connection-token"]