Skip to content

Commit e92ba7e

Browse files
committed
Redirect system-wide pip install to /usr/local
1 parent 1d6caa7 commit e92ba7e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/container/Dockerfile.base

+3-4
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,17 @@ git apply </opt/pip/pip-vcs-equivalency.patch
124124
git add -u
125125
git commit -m 'Adds JAX_TOOLBOX_VCS_EQUIVALENCY as a trigger to treat all github VCS installs for a package as equivalent. The spec of the last encountered version will be used'
126126
EOF
127-
# Container architecture currently uses pip to container-globally install using pip
128-
ENV PIP_BREAK_SYSTEM_PACKAGES=1
129127
RUN <<EOF bash -e
130128
PIP_PYZ_DIR=$(mktemp -d)
131129
pushd "${PIP_PYZ_DIR}"
132130
curl -O https://bootstrap.pypa.io/pip/pip.pyz
133131
chmod +x ./pip.pyz
134132
! pip && ! pip3 # there should not already be a pip
135-
python pip.pyz install --no-cache-dir -e /opt/pip
133+
python pip.pyz install --no-cache-dir --prefix=/usr -e /opt/pip
136134
popd
137135
rm -rf "${PIP_PYZ_DIR}"
138-
# Make sure that any later attempt to install `python3-pip` will fail
136+
pip config set global.prefix /usr
137+
# Make sure that any later attempt to install python3-pip will fail
139138
cat >/etc/apt/preferences.d/no-system-pip <<EOL
140139
# A patched pip is installed at /opt/pip.
141140
Package: python3-pip

0 commit comments

Comments
 (0)