sehsapneb commited on
Commit
4be6c0c
·
verified ·
1 Parent(s): 12fac2f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -1
Dockerfile CHANGED
@@ -1,5 +1,12 @@
1
  FROM python:3.11-slim
 
 
 
 
 
 
2
  COPY . /app
3
  WORKDIR /app
4
- RUN pip install --no-cache-dir -r requirements.txt
 
5
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.11-slim
2
+
3
+ # 安装依赖
4
+ COPY requirements.txt /tmp/
5
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
6
+
7
+ # 复制代码
8
  COPY . /app
9
  WORKDIR /app
10
+
11
+ # 运行 FastAPI
12
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]