vorstcavry commited on
Commit
a6ee074
Β·
verified Β·
1 Parent(s): 3dd959d

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +27 -0
  2. README.md +3 -1
  3. entrypoint.sh +20 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM deadolus/android-studio:latest
2
+
3
+ # Install required tools for VNC access and dummy display
4
+ RUN apt-get update && apt-get install -y \
5
+ x11vnc \
6
+ xvfb \
7
+ fluxbox \
8
+ net-tools \
9
+ && apt-get clean
10
+
11
+ # Set environment variables
12
+ ENV DISPLAY=:0
13
+ ENV RESOLUTION=1920x1080x24
14
+ ENV VNC_PORT=7860
15
+ ENV VNC_PASSWORD=android
16
+
17
+ # Expose VNC port
18
+ EXPOSE 7860
19
+
20
+ # Create directory for studio data
21
+ RUN mkdir -p /studio-data && chown -R root:root /studio-data
22
+
23
+ # Entry point script
24
+ COPY entrypoint.sh /entrypoint.sh
25
+ RUN chmod +x /entrypoint.sh
26
+
27
+ ENTRYPOINT ["/entrypoint.sh"]
README.md CHANGED
@@ -2,9 +2,11 @@
2
  title: Android Studio
3
  emoji: πŸ‘
4
  colorFrom: indigo
5
- colorTo: green
6
  sdk: docker
7
  pinned: false
 
 
8
  ---
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
2
  title: Android Studio
3
  emoji: πŸ‘
4
  colorFrom: indigo
5
+ colorTo: gray
6
  sdk: docker
7
  pinned: false
8
+ license: mit
9
+ short_description: MIT
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
entrypoint.sh ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+
4
+ # Start virtual display
5
+ Xvfb :0 -screen 0 $RESOLUTION &
6
+
7
+ # Start window manager
8
+ fluxbox &
9
+
10
+ # Start VNC server
11
+ x11vnc -display :0 -forever -passwd $VNC_PASSWORD -listen 0.0.0.0 -xkb -rfbport $VNC_PORT &
12
+
13
+ # If HOST_DISPLAY is set, connect to host display
14
+ if [ "$HOST_DISPLAY" == "1" ]; then
15
+ echo "Using host display"
16
+ exec android-studio
17
+ else
18
+ echo "Starting with dummy display"
19
+ exec android-studio
20
+ fi