zwq2018 commited on
Commit
947c6b2
·
1 Parent(s): 74c8a73

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用Hugging Face提供的基础镜像
2
+ FROM huggingface/moon-landing:latest
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 安装Python依赖
8
+ COPY requirements.txt /app/
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # 拷贝项目文件到工作目录
12
+ COPY . /app/
13
+
14
+ # 公开 Hugging Face Spaces 需要的 8000 端口
15
+ EXPOSE 8000
16
+
17
+ # 运行启动脚本 (确保你有一个app.py文件)
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]