封装fastAPI openAI接口规范
This commit is contained in:
20
fastapi_server/Dockerfile.api
Normal file
20
fastapi_server/Dockerfile.api
Normal file
@@ -0,0 +1,20 @@
|
||||
# 使用Python 3.9作为基础镜像
|
||||
FROM python:3.9-slim
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 复制requirements文件
|
||||
COPY requirements.txt .
|
||||
|
||||
# 安装Python依赖
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 复制项目文件
|
||||
COPY . .
|
||||
|
||||
# 暴露端口
|
||||
EXPOSE 8488
|
||||
|
||||
# 启动命令
|
||||
CMD ["python", "server.py"]
|
||||
Reference in New Issue
Block a user