From 61ebdc1c4d36bc8ae7350368e896ac3164386fde Mon Sep 17 00:00:00 2001 From: yym68686 Date: Sun, 25 Aug 2024 00:48:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=BB=20Code:=201.=20Upgrade=20ModelMerg?= =?UTF-8?q?e=20version=20to=200.11.10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2. Remove Google Search SDK, use RESTful API for Google search. 3. Use python:3.12-alpine to build a Docker image to reduce the image size. --- Dockerfile.build | 10 +++++----- ModelMerge | 2 +- requirements.txt | 3 +-- setup.sh | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Dockerfile.build b/Dockerfile.build index d6567c90..6b1dfbff 100644 --- a/Dockerfile.build +++ b/Dockerfile.build @@ -1,12 +1,12 @@ -FROM python:3.10.13 AS builder +FROM python:3.10-alpine AS builder COPY ./requirements.txt /home -RUN pip install -r /home/requirements.txt +RUN pip install --no-cache-dir -r /home/requirements.txt -FROM python:3.10.13-slim-bullseye +FROM python:3.10-alpine EXPOSE 8080 WORKDIR /home COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages COPY ./setup.sh /home -RUN apt-get update && apt-get install -y --no-install-recommends git \ - && rm -rf /var/lib/apt/lists/* /tmp/* +RUN apk add --no-cache git \ + && rm -rf /tmp/* ENTRYPOINT ["/home/setup.sh"] \ No newline at end of file diff --git a/ModelMerge b/ModelMerge index 48368fd9..816beaeb 160000 --- a/ModelMerge +++ b/ModelMerge @@ -1 +1 @@ -Subproject commit 48368fd934ba1260dd6e987bb951373392920ec0 +Subproject commit 816beaebf669130dc4a19a45f33d081e4c317e68 diff --git a/requirements.txt b/requirements.txt index de368dec..975d8191 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,5 +11,4 @@ pdfminer.six fake-useragent beautifulsoup4 tiktoken==0.6.0 -duckduckgo-search==5.3.1 -google-api-python-client==2.128.0 \ No newline at end of file +duckduckgo-search==5.3.1 \ No newline at end of file diff --git a/setup.sh b/setup.sh index b2667c82..cff52d62 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh set -eu rm -rf /home/ChatGPT-Telegram-Bot git clone --recurse-submodules --depth 1 -b main --quiet https://github.com/yym68686/ChatGPT-Telegram-Bot.git