update dockerfile
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,4 +1,3 @@
|
|||||||
# 使用Python 3.10作为基础镜像
|
|
||||||
FROM python:3.12-slim
|
FROM python:3.12-slim
|
||||||
|
|
||||||
# 设置工作目录
|
# 设置工作目录
|
||||||
@@ -12,6 +11,8 @@ ENV PYTHONUNBUFFERED=1
|
|||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
gcc \
|
gcc \
|
||||||
g++ \
|
g++ \
|
||||||
|
curl \
|
||||||
|
unzip \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# 复制项目文件
|
# 复制项目文件
|
||||||
@@ -20,6 +21,12 @@ COPY fastapi_server/requirements.txt ./fastapi_server/
|
|||||||
COPY lang_agent/ ./lang_agent/
|
COPY lang_agent/ ./lang_agent/
|
||||||
COPY fastapi_server/ ./fastapi_server/
|
COPY fastapi_server/ ./fastapi_server/
|
||||||
|
|
||||||
|
# download req files
|
||||||
|
RUN curl -o ./.env http://6.6.6.86:8888/download/resources/.env
|
||||||
|
RUN curl -o ./assets.zip http://6.6.6.86:8888/download/resources/assets.zip
|
||||||
|
RUN unzip assets.zip
|
||||||
|
RUN rm assets.zip
|
||||||
|
|
||||||
# 安装Python依赖
|
# 安装Python依赖
|
||||||
RUN pip install --no-cache-dir -r fastapi_server/requirements.txt
|
RUN pip install --no-cache-dir -r fastapi_server/requirements.txt
|
||||||
RUN pip install --no-cache-dir -e .
|
RUN pip install --no-cache-dir -e .
|
||||||
@@ -28,4 +35,4 @@ RUN pip install --no-cache-dir -e .
|
|||||||
EXPOSE 8488
|
EXPOSE 8488
|
||||||
|
|
||||||
# 启动命令
|
# 启动命令
|
||||||
CMD ["python", "fastapi_server/server.py"]
|
CMD ["python", "fastapi_server/server_dashscope.py"]
|
||||||
Reference in New Issue
Block a user