AZILS commited on
Commit
e7c1f6e
·
verified ·
1 Parent(s): b872be3

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +48 -0
  2. start.sh +18 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile for Antigravity Server on Hugging Face Spaces
2
+ # This version uses the native Web Server mode (No VNC needed!)
3
+
4
+ FROM ubuntu:22.04
5
+
6
+ ENV DEBIAN_FRONTEND=noninteractive
7
+
8
+ # 1. Install System Dependencies
9
+ RUN apt-get update && apt-get install -y \
10
+ wget \
11
+ curl \
12
+ git \
13
+ sudo \
14
+ libnss3 \
15
+ libatk1.3-0 \
16
+ libatk-bridge2.0-0 \
17
+ libcups2 \
18
+ libdrm2 \
19
+ libgbm1 \
20
+ libasound2 \
21
+ && rm -rf /var/lib/apt/lists/*
22
+
23
+ # 2. Setup User
24
+ RUN useradd -m -u 1000 user && \
25
+ echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
26
+
27
+ USER user
28
+ ENV HOME=/home/user \
29
+ PATH=/home/user/.local/bin:$PATH
30
+
31
+ WORKDIR $HOME
32
+
33
+ # 3. Install Antigravity IDE
34
+ # IMPORTANT: This assumes you have uploaded 'antigravity-linux.deb' to the Space
35
+ COPY --chown=user antigravity-linux.deb /home/user/antigravity.deb
36
+
37
+ RUN sudo apt-get update && \
38
+ sudo apt-get install -y ./antigravity.deb && \
39
+ sudo rm antigravity.deb
40
+
41
+ # 4. Copy Start Script
42
+ COPY --chown=user start.sh /home/user/start.sh
43
+ RUN chmod +x /home/user/start.sh
44
+
45
+ # Hugging Face Spaces use port 7860
46
+ EXPOSE 7860
47
+
48
+ CMD ["/home/user/start.sh"]
start.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ echo "Starting Antigravity Server..."
4
+
5
+ # Launch Antigravity in Web Server mode
6
+ # --host 0.0.0.0: Allows connections from outside the container
7
+ # --port 7860: The port Hugging Face expects
8
+ # --auth none: Allows you to access the IDE without a password (HF Spaces are public by default, use a Private Space for security!)
9
+ # --accept-server-license-terms: Required for running the server mode
10
+
11
+ antigravity --serve-web \
12
+ --host 0.0.0.0 \
13
+ --port 7860 \
14
+ --auth none \
15
+ --accept-server-license-terms \
16
+ --db-path $HOME/.antigravity-server \
17
+ --extensions-dir $HOME/.antigravity-extensions \
18
+ --user-data-dir $HOME/.antigravity-data