Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docker_test): 修复插件测试无法安装部分依赖的问题 #282

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/
### Fixed

- 修复插件元数据异常时导致插件测试验证报错的问题
- 修复插件测试无法安装部分依赖的问题

## [4.0.7] - 2024-11-20

Expand Down
26 changes: 12 additions & 14 deletions src/providers/docker_test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
ARG PYTHON_VERSION=3.10
ARG PYTHON_VERSION=3.12

FROM python:${PYTHON_VERSION} AS builder

RUN apt-get update -y \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*

RUN curl -sSL https://install.python-poetry.org -o install-poetry.py

FROM python:${PYTHON_VERSION}-slim
FROM python:${PYTHON_VERSION}

WORKDIR /tmp

COPY ./plugin_test.py /tmp/plugin_test.py
# OpenCV 所需的依赖
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get install ffmpeg libsm6 libxext6 -y \
&& apt-get purge -y --auto-remove \
&& rm -rf /var/lib/apt/lists/*

COPY --from=builder install-poetry.py /tmp/install-poetry.py

RUN python install-poetry.py --yes
# 测试插件依赖 Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -

ENV PATH="${PATH}:/root/.local/bin"

COPY ./plugin_test.py /tmp/plugin_test.py

CMD ["python", "plugin_test.py"]
Loading