Spaces:
Alao
/
Build error

tzcnb commited on
Commit
4bf98ba
·
verified ·
1 Parent(s): 3b70e71

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +14 -0
  2. README.md +15 -5
Dockerfile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM debian:sid
2
+ RUN apt update
3
+ RUN useradd -m -u 1000 user
4
+ RUN apt install xfce4-terminal lxde aqemu sudo curl wget aria2 qemu-system-x86 htop chromium screen tigervnc-standalone-server python3-pip python3-websockify python3 git -y
5
+ RUN git clone https://github.com/novnc/noVNC.git noVNC
6
+ RUN mkdir -p /home/user/.vnc
7
+ ARG VNC_PWD
8
+ ARG VNC_RESOLUTION
9
+ RUN --mount=type=secret,id=VNC_PWD,mode=0444,required=true \
10
+ cat /run/secrets/VNC_PWD | vncpasswd -f > /home/user/.vnc/passwd
11
+ RUN chmod -R 777 /home/user/.vnc /tmp
12
+ ENV HOME=/home/user \
13
+ PATH=/home/user/.local/bin:$PATH
14
+ CMD vncserver -SecurityTypes VncAuth -rfbauth /home/user/.vnc/passwd -geometry $VNC_RESOLUTION && ./noVNC/utils/novnc_proxy --vnc localhost:5901 --listen 0.0.0.0:7860
README.md CHANGED
@@ -1,10 +1,20 @@
1
  ---
2
- title: Vnc
3
- emoji: 🏢
4
- colorFrom: gray
5
- colorTo: indigo
6
  sdk: docker
7
  pinned: false
8
  ---
 
 
 
 
 
 
 
 
 
 
 
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: VNC-Server
3
+ emoji: 🐨
4
+ colorFrom: green
5
+ colorTo: pink
6
  sdk: docker
7
  pinned: false
8
  ---
9
+ 建议使用小号部署,这个项目会被封号,我已经被封了两个了
10
+ ## 上传代码
11
+ 在huggingface新建一个spaces,使用Docker,将`Dockerfile`和`README.md`上传上去
12
+
13
+ ## 环境变量
14
+ 需要一个环境变量 `VNC_RESOLUTION`
15
+ 值可以是 1024x768 或者 1920x1080
16
+ 还需要一个机密环境变量 `VNC_PWD`
17
+ 值自己需要记住,作为密码
18
+
19
+ ![Screenshot 2024-01-11 07 44 52](https://github.com/yangjianchuan/noVNC/assets/104043801/a084e55e-a7e0-43ec-8307-de05c69d6802)
20