@@ -8,17 +8,17 @@ ARG CLANG_VERSION=18
8
8
## Obtain GCP's NCCL TCPx plugin
9
9
###############################################################################
10
10
11
- FROM us-docker.pkg.dev/gce-ai-infra/gpudirect-tcpx/nccl-plugin-gpudirecttcpx:v3.1.10 as tcpx-installer-amd64
11
+ FROM us-docker.pkg.dev/gce-ai-infra/gpudirect-tcpx/nccl-plugin-gpudirecttcpx:v3.1.10 AS tcpx-installer-amd64
12
12
13
13
# make a stub arm64 container because GCP does not provide an arm64 version of the plugin
14
- FROM ubuntu as tcpx-installer-arm64
14
+ FROM ubuntu AS tcpx-installer-arm64
15
15
RUN <<"OUTEREOF" bash -ex
16
16
mkdir -p /scripts /var/lib/tcpx/lib64
17
17
echo '#!/bin/bash' > /scripts/container_entry.sh
18
18
chmod +x /scripts/container_entry.sh
19
19
OUTEREOF
20
20
21
- FROM tcpx-installer-${TARGETARCH} as tcpx-installer
21
+ FROM tcpx-installer-${TARGETARCH} AS tcpx-installer
22
22
RUN /scripts/container_entry.sh install
23
23
24
24
###############################################################################
@@ -51,14 +51,16 @@ apt_packages=(
51
51
liblzma-dev
52
52
python-is-python3
53
53
python3-pip
54
+ python3-venv
54
55
rsync
55
56
vim
56
57
wget
57
58
jq
58
59
# llvm.sh
59
- lsb-release software-properties-common
60
+ lsb-release
61
+ software-properties-common
60
62
# GCP autoconfig
61
- pciutils hwloc bind9-host
63
+ # pciutils hwloc bind9-host
62
64
)
63
65
if [[ $(dpkg --print-architecture) == arm64 ]]; then
64
66
# h5py: The newest release of of h5py (3.11.0) does not include ARM wheels and causes pip to build h5py.
@@ -125,7 +127,10 @@ git apply </opt/pip/pip-vcs-equivalency.patch
125
127
git add -u
126
128
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'
127
129
EOF
128
- RUN pip install --upgrade --no-cache-dir -e /opt/pip pip-tools && rm -rf ~/.cache/*
130
+ # Create a system-wide venv for the pip-installed world inside the containers
131
+ RUN python -m venv --prompt jax /opt/venv && /opt/venv/bin/pip install --no-cache-dir -e /opt/pip pip-tools
132
+ # Make sure `python` refers to the venv version
133
+ ENV PATH=/opt/venv/bin:${PATH}
129
134
130
135
###############################################################################
131
136
## Install TCPx
0 commit comments