♻️ 从Poetry迁移到pip和requirements.txt

This commit is contained in:
eust-w 2025-04-14 16:48:25 +08:00
parent 9cdbed4602
commit 830b96fec5
2 changed files with 5 additions and 13 deletions

View File

@ -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

View File

@ -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 . .