diff --git a/_includes/selector.html b/_includes/selector.html index f3223d7581c..a960e02fa24 100644 --- a/_includes/selector.html +++ b/_includes/selector.html @@ -536,6 +536,12 @@ removeLeadingZeros(version) { return version.split(".").map(Number).join("."); }, + areOnlyPypiAvailablePackagesSelected() { + var selected_packages = this.active_packages.filter(pkg => pkg !== "Choose Specific Packages" && pkg !== "Standard"); + var pypi_available_packages = ["cudf", "cuml", "dask-cudf", "raft"]; + return selected_packages.length > 0 && + selected_packages.every(pkg => pypi_available_packages.includes(pkg.toLowerCase())); + }, getpipCmdHtml() { var pip_install = `${this.highlightCmd("pip")} install`; var cuda_suffix = `-cu${this.active_pip_cuda_ver}`; @@ -594,6 +600,9 @@ // Make sure all packages (and version selectors) are quoted pkgs = pkgs.flatMap(pkg => '"' + pkg + '"'); + // Check if only PyPI-available packages are selected (exclude --extra-index-url for these) + var only_pypi_available_packages_selected = this.areOnlyPypiAvailablePackagesSelected(); + // For every n packages add a new line with a "\" character // We need i += n + 1 since the splice adds a new element to the array if (this.active_release === "Stable") { @@ -606,7 +615,7 @@ pkgs.splice(i, 0, "\\\n" + indentation.slice(0, -1)); } - return [pip_install, index_url, pkgs.flatMap(pkg => this.highlightPkgOrImg(pkg)).join(" ")] + return [pip_install, (only_pypi_available_packages_selected ? null : index_url), pkgs.flatMap(pkg => this.highlightPkgOrImg(pkg)).join(" ")] .filter(Boolean) .join(" \\\n" + indentation) }, @@ -677,7 +686,14 @@ }, getpipNotes() { var notes = []; - var install_location_notes = "RAPIDS pip packages are hosted by NVIDIA
" + + // Check if only PyPI-available packages are selected + var only_pypi_available_packages_selected = this.areOnlyPypiAvailablePackagesSelected(); + + var install_location_notes = only_pypi_available_packages_selected + ? "RAPIDS pip packages are hosted by NVIDIA, some are also available on the Python Package Index (PyPI).
" + : "RAPIDS pip packages are hosted by NVIDIA
"; + var version_string = this.getSupportedPythonVersions().map((v) => `${v}`).join(", ") notes = [...notes, install_location_notes, `pip installation supports the following Python versions: ${version_string}.
`];