Skip to content

Commit ba8a5c5

Browse files
committed
rhel8: python3.12
1 parent 752e911 commit ba8a5c5

File tree

4 files changed

+15
-20
lines changed

4 files changed

+15
-20
lines changed

templates/rhel8/common/base.dockerfile.j2

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@ 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-pip \
56+
python3-virtualenv \
5657
gcc-c++ \
5758
gcc \
5859
&& dnf clean all
5960

6061
RUN rm -rf /etc/pki/entitlement && rm -rf /etc/rhsm
6162

6263
# hadolint ignore=DL3013
63-
RUN python3 -m pip install --no-cache-dir numpy==1.23.1
64+
RUN python3.12 -m pip install --no-cache-dir numpy==2.3.4
6465
ARG OPENCV_BRANCH=4.10.0
6566
WORKDIR /opt/repo
6667
RUN git clone https://github.com/opencv/opencv.git
@@ -190,14 +191,14 @@ COPY --from=base /opt/intel /opt/intel
190191
{% endif %}
191192

192193
{% if 'runtime' == distribution %}
193-
ARG LGPL_DEPS="bash python39" # no new packages
194+
ARG LGPL_DEPS="bash python3.12" # no new packages
194195
ARG INSTALL_PACKAGES="-c=python -c=core"
195196
{% else %}
196197
ARG LGPL_DEPS="gcc-c++ \
197198
glibc \
198199
libstdc++ \
199200
libgcc \
200-
python39"
201+
python3.12"
201202
ARG INSTALL_PACKAGES="-c=opencv_req -c=python -c=opencv_opt -c=core -c=dev"
202203
{% endif %}
203204
ARG INSTALL_SOURCES="no"
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)