♻️ 从Poetry迁移到pip和requirements.txt
This commit is contained in:
parent
9cdbed4602
commit
830b96fec5
@ -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
|
||||
|
||||
12
Dockerfile
12
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 . .
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user