♻️ 从Poetry迁移到pip和requirements.txt
This commit is contained in:
parent
9cdbed4602
commit
830b96fec5
@ -8,11 +8,9 @@ steps:
|
|||||||
- name: build_imgsearcher
|
- name: build_imgsearcher
|
||||||
image: python:3.9-slim
|
image: python:3.9-slim
|
||||||
commands:
|
commands:
|
||||||
- pip install poetry
|
- pip install -r requirements.txt
|
||||||
- poetry config virtualenvs.create false
|
|
||||||
- poetry install
|
|
||||||
- mkdir -p build/imgsearcher
|
- 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:
|
when:
|
||||||
branch:
|
branch:
|
||||||
- dev
|
- dev
|
||||||
|
|||||||
12
Dockerfile
12
Dockerfile
@ -2,17 +2,11 @@ FROM python:3.9-slim
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# 安装Poetry
|
# 复制requirements.txt文件
|
||||||
RUN pip install --no-cache-dir poetry
|
COPY requirements.txt ./
|
||||||
|
|
||||||
# 配置Poetry不创建虚拟环境
|
|
||||||
RUN poetry config virtualenvs.create false
|
|
||||||
|
|
||||||
# 复制Poetry配置文件
|
|
||||||
COPY pyproject.toml poetry.lock* ./
|
|
||||||
|
|
||||||
# 安装依赖
|
# 安装依赖
|
||||||
RUN poetry install --no-interaction --no-ansi
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
# 复制应用程序代码
|
# 复制应用程序代码
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user