File size: 299 Bytes
a7b5277
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 使用Python的官方镜像
FROM python:3.9-slim

# 设置工作目录
WORKDIR /app

# 复制本地代码到容器中
COPY . /app

# 安装依赖
RUN pip install --no-cache-dir -r requirements.txt

# 设置容器启动时的命令
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]