diff --git a/Dockerfile b/Dockerfile index 2f1cd970..27755a35 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN echo '[global]' > /etc/pip.conf && \ # 语音输出功能(以下两行,第一行更换阿里源,第二行安装ffmpeg,都可以删除) RUN UBUNTU_VERSION=$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release); echo "deb https://mirrors.aliyun.com/debian/ $UBUNTU_VERSION main non-free contrib" > /etc/apt/sources.list; apt-get update RUN apt-get install ffmpeg -y +RUN apt-get clean # 进入工作路径(必要) @@ -33,6 +34,7 @@ RUN pip3 install -r requirements.txt # 非必要步骤,用于预热模块(可以删除) RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' +RUN python3 -m pip cache purge # 启动(必要) diff --git a/docs/GithubAction+AllCapacity b/docs/GithubAction+AllCapacity index b9b421cf..af2ab6b8 100644 --- a/docs/GithubAction+AllCapacity +++ b/docs/GithubAction+AllCapacity @@ -5,6 +5,7 @@ FROM fuqingxu/11.3.1-runtime-ubuntu20.04-with-texlive:latest # edge-tts需要的依赖,某些pip包所需的依赖 RUN apt update && apt install ffmpeg build-essential -y +RUN apt-get clean # use python3 as the system default python WORKDIR /gpt @@ -30,7 +31,7 @@ RUN python3 -m pip install -r request_llms/requirements_qwen.txt RUN python3 -m pip install -r request_llms/requirements_chatglm.txt RUN python3 -m pip install -r request_llms/requirements_newbing.txt RUN python3 -m pip install nougat-ocr - +RUN python3 -m pip cache purge # 预热Tiktoken模块 RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' diff --git a/docs/GithubAction+ChatGLM+Moss b/docs/GithubAction+ChatGLM+Moss index 7ebb1685..8c504d36 100644 --- a/docs/GithubAction+ChatGLM+Moss +++ b/docs/GithubAction+ChatGLM+Moss @@ -7,6 +7,7 @@ RUN apt-get install -y git python python3 python-dev python3-dev --fix-missing # edge-tts需要的依赖,某些pip包所需的依赖 RUN apt update && apt install ffmpeg build-essential -y +RUN apt-get clean # use python3 as the system default python RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python3.8 @@ -22,6 +23,7 @@ RUN python3 -m pip install -r request_llms/requirements_moss.txt RUN python3 -m pip install -r request_llms/requirements_qwen.txt RUN python3 -m pip install -r request_llms/requirements_chatglm.txt RUN python3 -m pip install -r request_llms/requirements_newbing.txt +RUN python3 -m pip cache purge # 预热Tiktoken模块 diff --git a/docs/GithubAction+NoLocal b/docs/GithubAction+NoLocal index c645871f..07553a2d 100644 --- a/docs/GithubAction+NoLocal +++ b/docs/GithubAction+NoLocal @@ -18,5 +18,7 @@ RUN apt update && apt install ffmpeg -y # 可选步骤,用于预热模块 RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' +RUN python3 -m pip cache purge && apt-get clean + # 启动 CMD ["python3", "-u", "main.py"] diff --git a/docs/GithubAction+NoLocal+Latex b/docs/GithubAction+NoLocal+Latex index 71d51796..77383ee1 100644 --- a/docs/GithubAction+NoLocal+Latex +++ b/docs/GithubAction+NoLocal+Latex @@ -30,5 +30,7 @@ COPY --chown=gptuser:gptuser . . # 可选步骤,用于预热模块 RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' +RUN python3 -m pip cache purge + # 启动 CMD ["python3", "-u", "main.py"] diff --git a/docs/GithubAction+NoLocal+Vectordb b/docs/GithubAction+NoLocal+Vectordb index c354566f..ba897f9b 100644 --- a/docs/GithubAction+NoLocal+Vectordb +++ b/docs/GithubAction+NoLocal+Vectordb @@ -24,6 +24,8 @@ RUN apt update && apt install ffmpeg -y # 可选步骤,用于预热模块 RUN python3 -c 'from check_proxy import warm_up_modules; warm_up_modules()' +RUN python3 -m pip cache purge && apt-get clean + # 启动 CMD ["python3", "-u", "main.py"]