HuggingFace0920 commited on
Commit
d58858d
·
verified ·
1 Parent(s): 744195b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # 安装git
4
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
5
+
6
+ # 克隆仓库
7
+ RUN git clone https://github.com/kfcx/HFSpaceDeploy.git /app
8
+
9
+ WORKDIR /app
10
+
11
+ # 安装依赖
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # 运行主程序前暴露端口
15
+ EXPOSE 7860
16
+
17
+ # 运行主程序
18
+ CMD ["python", "main.py"]