Skip to content

Commit

Permalink
fix: Specify and link python38
Browse files Browse the repository at this point in the history
Specify and link python38 to fix build/test failures due to
the wrong Python version (3.6) being used from base image.

Signed-off-by: Spolti <[email protected]>
  • Loading branch information
spolti committed Nov 24, 2023
1 parent c9dffb9 commit 1fa9f48
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Dockerfile.develop.ci
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,20 @@ ENV HOME=/go
WORKDIR /go/src/github.com/opendatahub-io/modelmesh-serving/

# Install build and dev tools
RUN --mount=type=cache,target=${HOME}/.cache/dnf:rw \
dnf install --setopt=cachedir=${HOME}/.cache/dnf -y --nodocs \
python3 \
python3-pip \
# NOTE: Require python38 to install pre-commit
RUN --mount=type=cache,target=/root/.cache/dnf:rw \
dnf install --setopt=cachedir=/root/.cache/dnf -y --nodocs \
nodejs \
jq
jq \
python38 \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& ln -sf /usr/bin/pip3 /usr/bin/pip \
&& true

# Install pre-commit
ENV PIP_CACHE_DIR=${HOME}/.cache/pip
RUN --mount=type=cache,target=${HOME}/.cache/pip \
pip3 install pre-commit
ENV PIP_CACHE_DIR=/root/.cache/pip
RUN --mount=type=cache,target=/root/.cache/pip \
pip install pre-commit

# First download and extract older dist of kubebuilder which includes required etcd, kube-apiserver and kubectl binaries
# Then download and overwrite kubebuilder binary with desired/latest version
Expand Down

0 comments on commit 1fa9f48

Please sign in to comment.