Skip to content

Commit

Permalink
Use pip --break-system-packages instead of pipx (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
daamien authored May 4, 2024
1 parent 31e60dd commit e7ee264
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,11 @@ FROM alpine-latex as alpine-extra
COPY common/extra/packages.txt /root/extra_packages.txt
COPY common/extra/requirements.txt /root/extra_requirements.txt

RUN apk --no-cache add pipx \
&& pipx install < /root/extra_requirements.txt \
# The option `--break-system-packages` sounds bad but this is not
# really a problem here because we are not using Python apk packages
# anyway.
RUN apk --no-cache add py-pip \
&& pip3 install -r /root/extra_requirements.txt --break-system-packages \
&& rm -f /root/extra_requirements.txt

RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | \
Expand Down
8 changes: 5 additions & 3 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,12 @@ FROM ubuntu-latex as ubuntu-extra
COPY common/extra/packages.txt /root/extra_packages.txt
COPY common/extra/requirements.txt /root/extra_requirements.txt

# The option `--break-system-packages` sounds bad but this is not
# really a problem here because we are not using Python debian packages
# anyway.
RUN apt-get -q --no-allow-insecure-repositories update \
&& apt-get install --assume-yes --no-install-recommends \
pipx \
&& pipx install < /root/extra_requirements.txt \
&& apt-get install --assume-yes --no-install-recommends python3-pip \
&& pip3 install -r /root/extra_requirements.txt --break-system-packages \
&& rm -f /root/extra_requirements.txt

RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | \
Expand Down

0 comments on commit e7ee264

Please sign in to comment.