profile114 commited on
Commit
74dddcd
·
verified ·
1 Parent(s): 34a8c62

Upload 5 files

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -0
  2. README.md +53 -4
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV PATH="/home/user/.local/bin:$PATH"
6
+
7
+ WORKDIR /app
8
+
9
+ COPY --chown=user requirements.txt requirements.txt
10
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
+
12
+ COPY --chown=user . /app
13
+
14
+ EXPOSE 7860
15
+
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
README.md CHANGED
@@ -1,10 +1,59 @@
1
  ---
2
  title: Hidden Control
3
- emoji: 😻
4
- colorFrom: green
5
- colorTo: gray
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: Hidden Control
3
+ emoji: 🖥️
4
+ colorFrom: blue
5
+ colorTo: purple
6
  sdk: docker
7
+ app_port: 7860
8
  pinned: false
9
  ---
10
 
11
+ # Hidden Control
12
+
13
+ Remote control web application deployed on Hugging Face Spaces.
14
+
15
+ ## 功能
16
+
17
+ - 远程控制界面
18
+ - 设备管理
19
+ - 命令执行
20
+
21
+ ## 部署
22
+
23
+ ### 1. 克隆仓库
24
+
25
+ ```bash
26
+ git clone https://huggingface.co/spaces/profile114/hidden_control
27
+ ```
28
+
29
+ ### 2. 本地测试
30
+
31
+ ```bash
32
+ pip install -r requirements.txt
33
+ uvicorn app:app --host 0.0.0.0 --port 7860
34
+ ```
35
+
36
+ ### 3. 推送到 HF
37
+
38
+ ```bash
39
+ git add .
40
+ git commit -m "Update"
41
+ git push
42
+ ```
43
+
44
+ ## 客户端配置
45
+
46
+ 在客户端 `config.json` 中设置:
47
+
48
+ ```json
49
+ {
50
+ "server_url": "https://profile114.hf.space",
51
+ "client_id": "",
52
+ "client_name": "我的电脑"
53
+ }
54
+ ```
55
+
56
+ ## 注意
57
+
58
+ - HF免费容器不支持WebSocket,使用HTTP轮询
59
+ - 数据存储在容器重置后会丢失