Skip to content

Commit

Permalink
fix: Specify Python 3.8 in Dockerfile (opendatahub-io#34)
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: Rafael Vasquez <[email protected]>
Signed-off-by: Spolti <[email protected]>
  • Loading branch information
rafvasq authored and spolti committed Jan 11, 2024
1 parent 10ae9e3 commit 020b98b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ USER root
ENV HOME=/root

# Install build and dev tools
# 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 \
python3 \
python3-pip \
nodejs \
nodejs \
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=/root/.cache/pip
RUN --mount=type=cache,target=/root/.cache/pip \
pip3 install pre-commit
pip install pre-commit

# When using the BuildKit backend, Docker predefines a set of ARG variables with
# information on the platform of the node performing the build (build platform)
Expand Down

0 comments on commit 020b98b

Please sign in to comment.