Skip to content

Commit

Permalink
fix rhel8 entitlement & package installation
Browse files Browse the repository at this point in the history
  • Loading branch information
culhatsker committed Nov 11, 2024
1 parent 38496a5 commit d6b3210
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/images_build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04]
image_os: [ubuntu20]
image_os: [ubuntu22]
image_distribution: [runtime]
exclude:
- os: ubuntu-20.04
Expand Down
42 changes: 21 additions & 21 deletions templates/rhel8/common/base.dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,33 +32,32 @@ FROM base as opencv
LABEL description="This is the dev image for OpenCV building with OpenVINO Runtime backend"
LABEL vendor="Intel Corporation"

RUN rm -f /etc/rhsm-host
{% if 'autobuild' != rhel_platform %}
COPY ./entitlement /etc/pki/entitlement
COPY ./rhsm-conf /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
{% endif %}

RUN rm -f /etc/rhsm-host && subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && dnf clean all
RUN dnf install -y https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm && dnf clean all
# hadolint ignore=DL3033
RUN yum install -y \
gtk3-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
ffmpeg-devel \
libmfx-devel \
cmake \
git \
python38-devel \
python38-pip \
gcc-c++ \
gcc && yum clean all
RUN subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm \
https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm \
&& dnf install -y \
gtk3-devel \
gstreamer1-devel \
gstreamer1-plugins-base-devel \
ffmpeg-devel \
libmfx-devel \
cmake \
git \
python39-devel \
python39-pip \
gcc-c++ \
gcc \
&& dnf clean all

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

RUN python3 -m pip install --no-cache-dir numpy==1.23.1
ARG OPENCV_BRANCH="377be68d923e40900ac5526242bcf221e3f355e5" # 4.8 with a fix for building tests
ARG OPENCV_BRANCH=4.10.0
WORKDIR /opt/repo
RUN git clone https://github.com/opencv/opencv.git
WORKDIR /opt/repo/opencv
Expand Down Expand Up @@ -187,13 +186,14 @@ COPY --from=base /opt/intel /opt/intel
{% endif %}

{% if 'runtime' == distribution %}
ARG LGPL_DEPS="bash" # no new packages
ARG LGPL_DEPS="bash python39" # no new packages
ARG INSTALL_PACKAGES="-c=python -c=core"
{% else %}
ARG LGPL_DEPS="gcc-c++ \
glibc \
libstdc++ \
libgcc"
libgcc \
python39"
ARG INSTALL_PACKAGES="-c=opencv_req -c=python -c=opencv_opt -c=core -c=dev"
{% endif %}
ARG INSTALL_SOURCES="no"
Expand Down
4 changes: 0 additions & 4 deletions templates/rhel8/python/python38.dockerfile.j2

This file was deleted.

4 changes: 4 additions & 0 deletions templates/rhel8/python/python39.dockerfile.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# setup Python
ENV PYTHON_VER python3.9

RUN ${PYTHON_VER} -m pip install --upgrade pip
4 changes: 2 additions & 2 deletions utils/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def add_build_args(parser: argparse.ArgumentParser):
parser.add_argument(
"-py",
"--python",
choices=["python37", "python38", "python310"],
choices=["python37", "python38", "python39", "python310", "python311", "python312"],
help="Python interpreter for docker image, currently default is python38",
)

Expand Down Expand Up @@ -519,7 +519,7 @@ def parse_args(name: str, description: str): # noqa
if args.os in "ubuntu22":
args.python = "python310"
else:
args.python = "python38"
args.python = "python39"

if args.python == "python38" and "win" in args.os:
if not hasattr(args, "pre_stage_msbuild") or not args.pre_stage_msbuild:
Expand Down

0 comments on commit d6b3210

Please sign in to comment.