AZILS commited on
Commit
5c2a531
ยท
verified ยท
1 Parent(s): 6c54906

Update run_app.sh

Browse files
Files changed (1) hide show
  1. run_app.sh +17 -16
run_app.sh CHANGED
@@ -1,26 +1,27 @@
1
  #!/bin/bash
2
- # Antigravity VS Code Startup Script
3
- # Optimized for Hugging Face Spaces
 
4
 
5
- # Use the PORT environment variable provided by Hugging Face (defaults to 7860)
6
- PORT=${PORT:-7860}
 
7
 
8
- echo "---------------------------------------------------"
9
- echo "๐Ÿš€ Antigravity VS Code is starting..."
10
- echo "๐Ÿ“ Port: $PORT"
11
- echo "๐Ÿ“ Workspace: $(pwd)"
12
- echo "---------------------------------------------------"
13
 
14
- # Start the Antigravity VS Code Web Server
15
- # --host 0.0.0.0 is required for external access
16
- # --port specifies the listening port
17
- # --accept-server-license-terms is required for automated startups
18
- # --without-connection-token allows access without a password
19
 
20
  antigravity serve-web \
21
  --host 0.0.0.0 \
22
- --port $PORT \
23
  --accept-server-license-terms \
24
  --without-connection-token \
 
 
25
  --user-data-dir /home/user/.antigravity-server \
26
- --extensions-dir /home/user/.antigravity-extensions
 
 
 
 
1
  #!/bin/bash
2
+ # Antigravity VS Code Robust Launcher
3
+ export HOME=/home/user
4
+ export SHELL=/bin/bash
5
 
6
+ # Ensure we are in the workspace
7
+ mkdir -p /home/user/workspace
8
+ cd /home/user/workspace
9
 
10
+ echo "--- STARTING ANTIGRAVITY VS CODE ---"
 
 
 
 
11
 
12
+ # We use --without-connection-token for ease of use in private spaces.
13
+ # If you want security, add --connection-token your_password
14
+ # --disable-chromium-sandbox is the most important flag for Docker.
 
 
15
 
16
  antigravity serve-web \
17
  --host 0.0.0.0 \
18
+ --port 7860 \
19
  --accept-server-license-terms \
20
  --without-connection-token \
21
+ --disable-chromium-sandbox \
22
+ --disable-gpu \
23
  --user-data-dir /home/user/.antigravity-server \
24
+ --extensions-dir /home/user/.antigravity-extensions
25
+
26
+ echo "--- SERVER EXITED ---"
27
+ sleep infinity