From 830b96fec5268baa668d372e06c618a9a5124ceb Mon Sep 17 00:00:00 2001 From: eust-w Date: Mon, 14 Apr 2025 16:48:25 +0800 Subject: [PATCH] =?UTF-8?q?:recycle:=20=E4=BB=8EPoetry=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E5=88=B0pip=E5=92=8Crequirements.txt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 6 ++---- Dockerfile | 12 +++--------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index 70b9ba3..e7b7d85 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,11 +8,9 @@ steps: - name: build_imgsearcher image: python:3.9-slim commands: - - pip install poetry - - poetry config virtualenvs.create false - - poetry install + - pip install -r requirements.txt - mkdir -p build/imgsearcher - - cp -r app.py app pyproject.toml poetry.lock Dockerfile build/imgsearcher/ + - cp -r app.py app requirements.txt Dockerfile build/imgsearcher/ when: branch: - dev diff --git a/Dockerfile b/Dockerfile index 2aaf6a2..835981c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,17 +2,11 @@ FROM python:3.9-slim WORKDIR /app -# 安装Poetry -RUN pip install --no-cache-dir poetry - -# 配置Poetry不创建虚拟环境 -RUN poetry config virtualenvs.create false - -# 复制Poetry配置文件 -COPY pyproject.toml poetry.lock* ./ +# 复制requirements.txt文件 +COPY requirements.txt ./ # 安装依赖 -RUN poetry install --no-interaction --no-ansi +RUN pip install --no-cache-dir -r requirements.txt # 复制应用程序代码 COPY . .