File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed
Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -299,15 +299,21 @@ PYTORCH_INDEX="https://download.pytorch.org/whl/cpu"
299299
300300if [ " $OS_ID " = " ubuntu" ] && [ " $OS_VERSION " = " 22.04" ]; then
301301 echo " Ubuntu 22.04 detected: force pip/setuptools/wheel versions"
302- uv pip install --extra-index-url " $PYTORCH_INDEX " setuptools wheel==0.45.1
302+ uv pip install --extra-index-url " $PYTORCH_INDEX " \
303+ --index-strategy unsafe-best-match \
304+ setuptools==80 wheel==0.45.1
303305else
304306 echo " $OS_ID $OS_VERSION detected: updating wheel and setuptools to latest"
305- uv pip install --upgrade wheel setuptools
307+ uv pip install --upgrade wheel setuptools==80
306308fi
307309
308310echo " Installing dev dependencies"
309311# Use --extra-index-url for PyTorch CPU wheels and index-strategy for transitive deps
310- uv pip install --extra-index-url " $PYTORCH_INDEX " --index-strategy unsafe-best-match -r " $( pwd) /tt_metal/python_env/requirements-dev.txt"
312+ # no-build-isolation as a workaround for setuptools/mmcv
313+ uv pip install --extra-index-url " $PYTORCH_INDEX " \
314+ --index-strategy unsafe-best-match \
315+ --no-build-isolation \
316+ -r " $( pwd) /tt_metal/python_env/requirements-dev.txt"
311317
312318echo " Installing tt-metal"
313319uv pip install -e .
Original file line number Diff line number Diff line change @@ -108,9 +108,6 @@ FROM ci-build AS ci-test
108108ARG UBUNTU_VERSION=22.04
109109ARG TT_METAL_INFRA_DIR=/opt/tt_metal_infra
110110
111- # needed for setuptools dep tree
112- RUN apt install python3-pkg-resources
113-
114111# Create directories for infra
115112RUN mkdir -p ${TT_METAL_INFRA_DIR}/tt-metal/docs/
116113RUN mkdir -p ${TT_METAL_INFRA_DIR}/tt-metal/tests/sweep_framework/
@@ -125,6 +122,9 @@ COPY /tools/triage/requirements.txt ${TT_METAL_INFRA_DIR}/tools/triage/requireme
125122# Configure PyTorch CPU index and install Python packages using uv
126123# index-strategy unsafe-best-match is used to avoid pulling in transitive dependencies
127124# that are not explicitly listed in the requirements.txt files
125+ # no-build-isolation is for pulling in pkg_resources from the system package
126+ # which setuptools removed in version 82. The old setuptools wheels apparently
127+ # do not automatically pull in pkg_resources
128128RUN umask 000 && \
129129 uv pip install --no-cache --index-url https://download.pytorch.org/whl/cpu torch && \
130130 uv pip install --index-strategy unsafe-best-match --no-cache --no-build-isolation -r ${TT_METAL_INFRA_DIR}/tt-metal/tt_metal/python_env/requirements-dev.txt && \
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ init_packages() {
200200 " python3-dev"
201201 " python3-pip"
202202 " python3-venv"
203+ " python3-pkg-resources" # needed for setuptools
203204 " libhwloc-dev"
204205 " libnuma-dev"
205206 " libatomic1"
You can’t perform that action at this time.
0 commit comments