generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(docker_test): 修复插件测试无法安装部分依赖的问题 (#282)
- Loading branch information
Showing
2 changed files
with
13 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |