Skip to content

Commit 1e9e0e3

Browse files
authored
rhel8: python3.12 (#331)
* rhel8: python3.12 * fix github workflow
1 parent 752e911 commit 1e9e0e3

File tree

7 files changed

+19
-25
lines changed

7 files changed

+19
-25
lines changed

.github/workflows/codestyle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
codestyle:
99
strategy:
1010
matrix:
11-
os: ubuntu-24.04
11+
os: [ubuntu-24.04]
1212
runs-on: ${{ matrix.os }}
1313
steps:
1414
- name: Code checkout

templates/rhel8/common/base.dockerfile.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ RUN curl --insecure -LO https://dl.fedoraproject.org/pub/epel/epel-release-lates
5151
libmfx-devel \
5252
cmake \
5353
git \
54-
python39-devel \
55-
python39-pip \
54+
python3.12-devel \
55+
python3.12-numpy \
56+
python3-pip \
57+
python3-virtualenv \
5658
gcc-c++ \
5759
gcc \
5860
&& dnf clean all
5961

6062
RUN rm -rf /etc/pki/entitlement && rm -rf /etc/rhsm
6163

62-
# hadolint ignore=DL3013
63-
RUN python3 -m pip install --no-cache-dir numpy==1.23.1
6464
ARG OPENCV_BRANCH=4.10.0
6565
WORKDIR /opt/repo
6666
RUN git clone https://github.com/opencv/opencv.git
@@ -190,14 +190,14 @@ COPY --from=base /opt/intel /opt/intel
190190
{% endif %}
191191

192192
{% if 'runtime' == distribution %}
193-
ARG LGPL_DEPS="bash python39" # no new packages
193+
ARG LGPL_DEPS="bash python3.12" # no new packages
194194
ARG INSTALL_PACKAGES="-c=python -c=core"
195195
{% else %}
196196
ARG LGPL_DEPS="gcc-c++ \
197197
glibc \
198198
libstdc++ \
199199
libgcc \
200-
python39"
200+
python3.12"
201201
ARG INSTALL_PACKAGES="-c=opencv_req -c=python -c=opencv_opt -c=core -c=dev"
202202
{% endif %}
203203
ARG INSTALL_SOURCES="no"

templates/rhel8/dist/dev.dockerfile.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ ARG OPENVINO_WHEELS_URL
55
# hadolint ignore=SC2102,DL3033
66
RUN yum install -y cmake git && yum clean all && \
77
if [ -z "$OPENVINO_WHEELS_URL" ]; then \
8-
${PYTHON_VER} -m pip install --no-cache-dir openvino=="${OPENVINO_WHEELS_VERSION}"; \
8+
python3 -m pip install --no-cache-dir openvino=="${OPENVINO_WHEELS_VERSION}"; \
99
else \
10-
${PYTHON_VER} -m pip install --no-cache-dir --pre openvino=="${OPENVINO_WHEELS_VERSION}" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL"; \
10+
python3 -m pip install --no-cache-dir --pre openvino=="${OPENVINO_WHEELS_VERSION}" --trusted-host=* --find-links "$OPENVINO_WHEELS_URL"; \
1111
fi
1212

1313
# download source for PyPi LGPL packages
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Install OpenVINO python API dependency
2-
RUN ${PYTHON_VER} -m pip install --no-cache-dir numpy==1.24.4
2+
RUN python3 -m pip install --no-cache-dir numpy==1.24.4
33

44
WORKDIR ${INTEL_OPENVINO_DIR}/licensing
55
RUN curl -L https://raw.githubusercontent.com/openvinotoolkit/docker_ci/master/dockerfiles/rhel8/third-party-programs-docker-runtime.txt --output third-party-programs-docker-runtime.txt
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# setup Python
2+
ENV VIRTUAL_ENV=/opt/venv
3+
RUN python3.12 -m venv $VIRTUAL_ENV
4+
ENV PATH=$VIRTUAL_ENV/bin:$PATH
5+
6+
# hadolint ignore=DL3013
7+
RUN python3 -m pip install --no-cache-dir --upgrade pip

templates/rhel8/python/python39.dockerfile.j2

Lines changed: 0 additions & 4 deletions
This file was deleted.

utils/arg_parser.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -517,19 +517,10 @@ def parse_args(name: str, description: str): # noqa
517517
)
518518

519519
if not args.python:
520-
if args.os == "ubuntu24":
521-
args.python = "python312"
522-
elif args.os == "ubuntu22":
520+
if args.os == "ubuntu22":
523521
args.python = "python310"
524522
else:
525-
args.python = "python39"
526-
527-
if args.python == "python38" and "win" in args.os:
528-
if not hasattr(args, "pre_stage_msbuild") or not args.pre_stage_msbuild:
529-
parser.error(
530-
"Option --pre_stage_msbuild is required for Windows images to build the latest version "
531-
"of Python 3.8"
532-
)
523+
args.python = "python312"
533524

534525
if not args.distribution and args.package_url:
535526
if "_runtime_" in args.package_url:

0 commit comments

Comments
 (0)