sehsapneb commited on
Commit
d941691
·
verified ·
1 Parent(s): 3c75ad3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1 \
4
+ PIP_NO_CACHE_DIR=1
5
+
6
+ WORKDIR /app
7
+
8
+ # 安装依赖
9
+ COPY requirements.txt .
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+
12
+ # 拷贝代码
13
+ COPY . .
14
+
15
+ # 运行 FastAPI 应用
16
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]