harpaustin commited on
Commit
72bf59d
·
1 Parent(s): c0f4144

Add dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ghcr.io/harpaustin/hf-space-manager:latest
2
+
3
+ # 设置工作目录
4
+ WORKDIR /app
5
+
6
+ # 将当前目录下的所有文件复制到工作目录
7
+ COPY . .
8
+
9
+ # 安装项目依赖
10
+ RUN pip install Flask python-dotenv huggingface_hub requests gunicorn flask-socketio python-engineio python-socketio eventlet apscheduler
11
+
12
+ # 开放应用程序的端口
13
+ EXPOSE 7860
14
+
15
+ # 设置环境变量(可选,如果需要传递 Docker 环境中的环境变量)
16
+ # ENV USERNAME=your_username
17
+ # ENV PASSWORD=your_password
18
+ # ENV HF_TOKENS=token1,token2,token3
19
+ # ENV API_KEY=your_apikey
20
+
21
+ # 定义启动命令
22
+ CMD ["gunicorn", "--worker-class", "eventlet", "--bind", "0.0.0.0:7860", "app:app"]