Skip to content

Commit e73fed3

Browse files
committed
fix: Fixed torch install issue in CI
Signed-off-by: ntkathole <nikhilkathole2683@gmail.com>
1 parent 4c65872 commit e73fed3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Makefile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,13 @@ install-python-dependencies-minimal: ## Install minimal Python dependencies usin
8383
install-python-dependencies-ci: ## Install Python CI dependencies in system environment using uv
8484
# Install CPU-only torch first to prevent CUDA dependency issues
8585
pip uninstall torch torchvision -y || true
86-
pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu --force-reinstall
87-
uv pip sync --system sdk/python/requirements/py$(PYTHON_VERSION)-ci-requirements.txt
86+
@if [ "$$(uname -s)" = "Linux" ]; then \
87+
echo "Installing dependencies with torch CPU index for Linux..."; \
88+
uv pip sync --system --extra-index-url https://download.pytorch.org/whl/cpu --index-strategy unsafe-best-match sdk/python/requirements/py$(PYTHON_VERSION)-ci-requirements.txt; \
89+
else \
90+
echo "Installing dependencies from PyPI for macOS..."; \
91+
uv pip sync --system sdk/python/requirements/py$(PYTHON_VERSION)-ci-requirements.txt; \
92+
fi
8893
uv pip install --system --no-deps -e .
8994

9095
# Used in github actions/ci

0 commit comments

Comments
 (0)