Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 18 additions & 2 deletions _includes/selector.html
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down Expand Up @@ -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") {
Expand All @@ -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)
},
Expand Down Expand Up @@ -677,7 +686,14 @@
},
getpipNotes() {
var notes = [];
var install_location_notes = "RAPIDS pip packages are hosted by NVIDIA<br>"

// 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).<br>"
: "RAPIDS pip packages are hosted by NVIDIA<br>";

var version_string = this.getSupportedPythonVersions().map((v) => `<code>${v}</code>`).join(", ")
notes = [...notes, install_location_notes,
`pip installation supports the following Python versions: ${version_string}.<br>`];
Expand Down