Skip to content

Commit 69f1a6d

Browse files
committed
ci: fix PEP 668 with environment variable - ubuntu 24.04 blocks --user too
1 parent 24b7e39 commit 69f1a6d

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ jobs:
106106
uses: actions/checkout@v6
107107

108108
- name: Install lint dependencies
109-
run: pip install --no-cache-dir --user flake8==7.3.0 reuse==5.1.0
109+
env:
110+
PIP_BREAK_SYSTEM_PACKAGES: 1
111+
run: pip install --no-cache-dir flake8==7.3.0 reuse==5.1.0
110112

111113
- name: Run flake8
112114
run: flake8

Dockerfile.ci

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ RUN add-apt-repository -y ppa:deadsnakes/ppa && \
2929
COPY test/requirements.txt /tmp/requirements-test.txt
3030
COPY docs/requirements.txt /tmp/requirements-docs.txt
3131

32-
RUN pip install --no-cache-dir --user setuptools wheel build
33-
RUN pip install --no-cache-dir --user \
32+
# Set environment variable to allow pip installs in managed environment
33+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
34+
35+
RUN pip install --no-cache-dir setuptools wheel build
36+
RUN pip install --no-cache-dir \
3437
-r /tmp/requirements-test.txt \
3538
-r /tmp/requirements-docs.txt
36-
37-
# Add user site-packages to PATH
38-
ENV PATH="/root/.local/bin:$PATH"
3939
ENV CUDA_HOME="/usr/local/cuda"
4040
ENV PATH="$PATH:/usr/local/cuda/bin"
4141
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}"

0 commit comments

Comments
 (0)