mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-20 18:54:09 +00:00
Create Python API (#457)
* 更新镜像 * 更新镜像信息 * 更新镜像信息 * Create openai_api.py * Create requirements.txt * Create README.md * 添加python接口 * Delete python directory * Create README.md * Create Python API * 文件结构化 * 文件结构化
This commit is contained in:
20
python/api/dockerfile
Normal file
20
python/api/dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
# 使用官方Python运行时作为父镜像
|
||||
FROM python:3.8
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /app
|
||||
|
||||
# 将当前目录内容复制到容器的/app中
|
||||
ADD . /app
|
||||
|
||||
RUN pip install --upgrade -i https://pypi.tuna.tsinghua.edu.cn/simple pip
|
||||
# 安装程序需要的包
|
||||
RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir -r requirements.txt
|
||||
|
||||
RUN python -m nltk.downloader punkt
|
||||
|
||||
# 运行时监听的端口
|
||||
EXPOSE 6010
|
||||
|
||||
# 运行app.py时的命令及其参数
|
||||
CMD ["python", "main.py"]
|
Reference in New Issue
Block a user