Skip to content

Commit c938310

Browse files
leofangclaude
andcommitted
Move PIP_ROOT_USER_ACTION from container.env to job-level env
The pip root-user warning was still appearing because actions/setup-python runs its internal "pip upgrade" on the host runner, not inside the container. Container-level env vars are invisible to host-side actions. Moving PIP_ROOT_USER_ACTION to the job-level env block makes it available to both host-side actions (setup-python) and container-side run steps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1a0a753 commit c938310

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ jobs:
4343
HOST_PLATFORM: "linux-64"
4444
ARCH: "x86_64"
4545
CUDA_VER: ${{ needs.coverage-vars.outputs.CUDA_VER }}
46+
# Suppress pip warnings in container jobs running as root.
47+
# This must be at the job level (not container.env) so that actions
48+
# running on the host (e.g. setup-python's internal pip upgrade) also see it.
49+
PIP_ROOT_USER_ACTION: "ignore"
4650
# Our self-hosted runners require a container
4751
# TODO: use a different (nvidia?) container
4852
container:
@@ -51,7 +55,6 @@ jobs:
5155
env:
5256
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
5357
PIP_CACHE_DIR: "/tmp/pip-cache"
54-
PIP_ROOT_USER_ACTION: "ignore"
5558
steps:
5659
- name: Ensure GPU is working
5760
run: nvidia-smi

.github/workflows/test-wheel-linux.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ jobs:
7878
runs-on: "linux-${{ matrix.ARCH }}-gpu-${{ matrix.GPU }}-${{ matrix.DRIVER }}-${{ matrix.GPU_COUNT }}"
7979
# The build stage could fail but we want the CI to keep moving.
8080
if: ${{ github.repository_owner == 'nvidia' && !cancelled() }}
81+
env:
82+
# Suppress pip warnings in container jobs running as root.
83+
# This must be at the job level (not container.env) so that actions
84+
# running on the host (e.g. setup-python's internal pip upgrade) also see it.
85+
PIP_ROOT_USER_ACTION: "ignore"
8186
# Our self-hosted runners require a container
8287
# TODO: use a different (nvidia?) container
8388
container:
@@ -86,7 +91,6 @@ jobs:
8691
env:
8792
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }}
8893
PIP_CACHE_DIR: "/tmp/pip-cache"
89-
PIP_ROOT_USER_ACTION: "ignore"
9094
steps:
9195
- name: Ensure GPU is working
9296
run: nvidia-smi

0 commit comments

Comments
 (0)