Skip to content

Commit a6be65b

Browse files
committed
fix(docker_test): 修复插件测试无法安装部分依赖的问题
1 parent 644656c commit a6be65b

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/lang/zh-CN/
1010
### Fixed
1111

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

1415
## [4.0.7] - 2024-11-20
1516

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
ARG PYTHON_VERSION=3.10
1+
ARG PYTHON_VERSION=3.12
22

3-
FROM python:${PYTHON_VERSION} AS builder
4-
5-
RUN apt-get update -y \
6-
&& apt-get install -y curl \
7-
&& rm -rf /var/lib/apt/lists/*
8-
9-
RUN curl -sSL https://install.python-poetry.org -o install-poetry.py
10-
11-
FROM python:${PYTHON_VERSION}-slim
3+
FROM python:${PYTHON_VERSION}
124

135
WORKDIR /tmp
146

15-
COPY ./plugin_test.py /tmp/plugin_test.py
7+
# OpenCV 所需的依赖
8+
RUN apt-get update \
9+
&& apt-get -y upgrade \
10+
&& apt-get install ffmpeg libsm6 libxext6 -y \
11+
&& apt-get purge -y --auto-remove \
12+
&& rm -rf /var/lib/apt/lists/*
1613

17-
COPY --from=builder install-poetry.py /tmp/install-poetry.py
18-
19-
RUN python install-poetry.py --yes
14+
# 测试插件依赖 Poetry
15+
RUN curl -sSL https://install.python-poetry.org | python3 -
2016

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

19+
COPY ./plugin_test.py /tmp/plugin_test.py
20+
2321
CMD ["python", "plugin_test.py"]

0 commit comments

Comments
 (0)