fix: Fixed torch install issue in CI · feast-dev/feast@366e5a8

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