Skip to content

Commit f7646da

Browse files
Copilotaclegg3
andcommitted
Install PyTorch without numpy constraint then downgrade numpy
Co-authored-by: aclegg3 <1445143+aclegg3@users.noreply.github.com>
1 parent 57062dc commit f7646da

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/actions/install_ubuntu_deps/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@ runs:
5050
run: |-
5151
echo "Install conda and dependencies"
5252
# PyTorch 1.12.1 is pinned for CUDA 11.3 compatibility with habitat-sim
53-
# Install PyTorch FIRST with all its dependencies (including MKL with ITT API)
54-
# This ensures PyTorch gets the correct MKL version it was built against
55-
conda install -y pytorch==1.12.1 torchvision==0.13.1 "numpy<2.0" -c pytorch -c nvidia
56-
# Install remaining conda packages, avoid touching PyTorch/NumPy
53+
# Install PyTorch FIRST without numpy constraint to get all its dependencies (including MKL with ITT API)
54+
conda install -y pytorch==1.12.1 torchvision==0.13.1 -c pytorch -c nvidia
55+
# Downgrade numpy if needed to ensure NumPy 1.x (PyTorch 1.12.1 requires NumPy 1.x)
56+
conda install -y --force-reinstall "numpy<2.0" -c conda-forge
57+
# Install remaining conda packages
5758
conda install -y -c conda-forge ninja pytest pytest-cov ccache hypothesis pytest-mock
5859
# Pin opencv-python to version compatible with NumPy 1.x (opencv 4.10.0.84 is last before NumPy 2.x requirement)
5960
# PyTorch 1.12.1 requires NumPy 1.x for proper symbol resolution (iJIT_NotifyEvent)

0 commit comments

Comments
 (0)