mah000 commited on
Commit
ca217c9
·
1 Parent(s): 9167aa8

Add Dockerfile for Hugging Face Space deployment

Browse files
Files changed (2) hide show
  1. .dockerignore +5 -0
  2. Dockerfile +18 -0
.dockerignore ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ .env
2
+ __pycache__/
3
+ *.pyc
4
+ .DS_Store
5
+ .git/
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方 Python 基础镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 复制依赖文件并安装依赖
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # 复制应用代码
12
+ COPY . .
13
+
14
+ # 暴露 Streamlit 默认端口
15
+ EXPOSE 8501
16
+
17
+ # 启动 Streamlit 应用
18
+ CMD ["streamlit", "run", "bitbcpy.py", "--server.address=0.0.0.0"]