-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use CUDA version ranges in release selector. #524
Changes from 7 commits
fd62f53
5a60880
6fca371
c0fc8ec
8472be0
f539281
269c18d
c68ec79
193ca3b
9641a92
57a0d13
a1fdc38
6437ef1
4f736ed
4f00791
6807a75
ab1bbce
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -244,11 +244,11 @@ | |||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
</template> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
<div class="options-section" x-show="active_method !== 'pip'"> | ||||||||||||||||||||||||
<div class="options-section" x-show="active_method === 'Conda'"> | ||||||||||||||||||||||||
<div class="option-label">ENV. CUDA</div> | ||||||||||||||||||||||||
<template x-for="version in cuda_vers"> | ||||||||||||||||||||||||
<div x-on:click="(e) => cudaClickHandler(e, version)" | ||||||||||||||||||||||||
x-bind:class="{'active': version === active_cuda_ver, 'disabled': disableUnsupportedCuda(version)}" | ||||||||||||||||||||||||
<template x-for="version in conda_cuda_vers"> | ||||||||||||||||||||||||
<div x-on:click="(e) => condaCUDAClickHandler(e, version)" | ||||||||||||||||||||||||
x-bind:class="{'active': version === active_conda_cuda_ver, 'disabled': disableUnsupportedCuda(version)}" | ||||||||||||||||||||||||
class="option" x-text="'CUDA ' + version"></div> | ||||||||||||||||||||||||
</template> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
|
@@ -260,6 +260,14 @@ | |||||||||||||||||||||||
x-text="'CUDA ' + version"></div> | ||||||||||||||||||||||||
</template> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
<div class="options-section" x-show="active_method === 'Docker'"> | ||||||||||||||||||||||||
<div class="option-label">Image CUDA</div> | ||||||||||||||||||||||||
<template x-for="version in docker_cuda_vers"> | ||||||||||||||||||||||||
<div x-on:click="(e) => dockerCUDAClickHandler(e, version)" | ||||||||||||||||||||||||
x-bind:class="{'active': version === active_docker_cuda_ver, 'disabled': disableUnsupportedCuda(version)}" | ||||||||||||||||||||||||
class="option" x-text="'CUDA ' + version"></div> | ||||||||||||||||||||||||
</template> | ||||||||||||||||||||||||
</div> | ||||||||||||||||||||||||
<div class="options-section" x-show="active_method !== 'pip'"> | ||||||||||||||||||||||||
<div class="option-label">Python</div> | ||||||||||||||||||||||||
<template x-for="version in python_vers"> | ||||||||||||||||||||||||
|
@@ -360,8 +368,9 @@ | |||||||||||||||||||||||
Alpine.data('rapids_selector', () => ({ | ||||||||||||||||||||||||
// default values | ||||||||||||||||||||||||
active_python_ver: "3.11", | ||||||||||||||||||||||||
active_cuda_ver: "12.2", | ||||||||||||||||||||||||
active_conda_cuda_ver: "12.0 - 12.2", | ||||||||||||||||||||||||
active_pip_cuda_ver: "12", | ||||||||||||||||||||||||
active_docker_cuda_ver: "12.2", | ||||||||||||||||||||||||
active_method: "Conda", | ||||||||||||||||||||||||
active_release: "Stable", | ||||||||||||||||||||||||
active_img_type: "Base", | ||||||||||||||||||||||||
|
@@ -371,8 +380,9 @@ | |||||||||||||||||||||||
|
||||||||||||||||||||||||
// all possible values | ||||||||||||||||||||||||
python_vers: ["3.9", "3.10", "3.11"], | ||||||||||||||||||||||||
cuda_vers: ["11.2", "11.8", "12.0", "12.2", "12.5"], | ||||||||||||||||||||||||
pip_cuda_vers: ["11.2 - 11.8", "12"], | ||||||||||||||||||||||||
conda_cuda_vers: ["11.4 - 11.8", "12.0 - 12.2", "12.0 - 12.5"], | ||||||||||||||||||||||||
pip_cuda_vers: ["11.4 - 11.8", "12"], | ||||||||||||||||||||||||
docker_cuda_vers: ["11.8", "12.0", "12.2", "12.5"], | ||||||||||||||||||||||||
methods: ["Conda", "pip", "Docker"], | ||||||||||||||||||||||||
releases: ["Stable", "Nightly"], | ||||||||||||||||||||||||
img_loc: ["NGC", "Dockerhub"], | ||||||||||||||||||||||||
|
@@ -437,8 +447,9 @@ | |||||||||||||||||||||||
var rapids_channel = this.active_release === "Stable" ? "rapidsai" : "rapidsai-nightly"; | ||||||||||||||||||||||||
var dask_prefix = this.active_release === "Nightly" ? "dask/label/dev::" : ""; | ||||||||||||||||||||||||
var python_version = this.active_python_ver; | ||||||||||||||||||||||||
var cuda_version = this.active_cuda_ver; | ||||||||||||||||||||||||
var py_cuda_pkgs = [this.highlightPkgOrImg("python") + "=" + python_version, this.highlightPkgOrImg("cuda-version") + "=" + cuda_version].join(" "); | ||||||||||||||||||||||||
var cuda_version_bounds = this.active_conda_cuda_ver.split(" - "); | ||||||||||||||||||||||||
var cuda_version_pinning = ">=" + cuda_version_bounds[0] + ".*,<=" + cuda_version_bounds[1] + ".*"; | ||||||||||||||||||||||||
var py_cuda_pkgs = [this.highlightPkgOrImg("python") + "=" + python_version, this.highlightPkgOrImg("cuda-version") + cuda_version_pinning].join(" "); | ||||||||||||||||||||||||
var conda_channels = [rapids_channel, "conda-forge", "nvidia"] | ||||||||||||||||||||||||
.map(ch => "-" + this.highlightFlag("c") + " " + ch + " ") | ||||||||||||||||||||||||
.join(""); | ||||||||||||||||||||||||
|
@@ -583,7 +594,7 @@ | |||||||||||||||||||||||
|
||||||||||||||||||||||||
var imgTag = [ | ||||||||||||||||||||||||
(isNightly ? this.getNightlyVersion() + "a" : this.getStableVersion()), | ||||||||||||||||||||||||
"cuda" + this.active_cuda_ver, | ||||||||||||||||||||||||
"cuda" + this.active_docker_cuda_ver, | ||||||||||||||||||||||||
"py" + this.active_python_ver | ||||||||||||||||||||||||
].join("-"); | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
@@ -603,7 +614,7 @@ | |||||||||||||||||||||||
}, | ||||||||||||||||||||||||
getDockerNotes() { | ||||||||||||||||||||||||
var notes = []; | ||||||||||||||||||||||||
if (this.active_cuda_ver.startsWith("12") && this.active_release === "Stable") { | ||||||||||||||||||||||||
if (this.active_docker_cuda_ver.startsWith("12") && this.active_release === "Stable") { | ||||||||||||||||||||||||
var pkgs_html = this.rapids_meta_pkgs.map(pkg => "<code>" + pkg + "</code>").join(", "); | ||||||||||||||||||||||||
notes = [...notes] | ||||||||||||||||||||||||
} else { | ||||||||||||||||||||||||
|
@@ -673,9 +684,9 @@ | |||||||||||||||||||||||
}, | ||||||||||||||||||||||||
disableUnsupportedCuda(cuda_version) { | ||||||||||||||||||||||||
var isDisabled = false; | ||||||||||||||||||||||||
if (this.active_additional_packages.includes("TensorFlow") && (cuda_version !== "12.0")) isDisabled = true; | ||||||||||||||||||||||||
if (this.active_method === "Docker" && cuda_version < "11.8") isDisabled = true; | ||||||||||||||||||||||||
if (this.active_release === "Stable" && cuda_version === "12.5") isDisabled = true; | ||||||||||||||||||||||||
if (this.active_additional_packages.includes("TensorFlow") && (!cuda_version.startsWith("12"))) isDisabled = true; | ||||||||||||||||||||||||
// Remove once stable releases support CUDA 12.5 | ||||||||||||||||||||||||
if (this.active_release === "Stable" && cuda_version.includes("12.5")) isDisabled = true; | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
return isDisabled; | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
disableUnsupportedPython(python_version) { | ||||||||||||||||||||||||
|
@@ -705,22 +716,30 @@ | |||||||||||||||||||||||
releaseClickHandler(e, release) { | ||||||||||||||||||||||||
if (this.isDisabled(e.target)) return; | ||||||||||||||||||||||||
this.active_release = release; | ||||||||||||||||||||||||
if ( this.active_release === "Stable" && this.active_cuda_ver === "12.5") { | ||||||||||||||||||||||||
this.active_cuda_ver = "12.2"; | ||||||||||||||||||||||||
// Remove once stable releases support CUDA 12.5 | ||||||||||||||||||||||||
if (this.active_release === "Stable" && this.active_conda_cuda_ver === "12.0 - 12.5") { | ||||||||||||||||||||||||
this.active_conda_cuda_ver = "12.0 - 12.2"; | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
if (this.active_release === "Stable" && this.active_docker_cuda_ver === "12.5") { | ||||||||||||||||||||||||
this.active_docker_cuda_ver = "12.2"; | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
} | ||||||||||||||||||||||||
Comment on lines
+736
to
738
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you think about capturing Perhaps we could do something like...?
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we leave this for a later PR? I think this ties in with the above thread, where I struggled to get a "structured" JSON format to work. |
||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
imgTypeClickHandler(e, type) { | ||||||||||||||||||||||||
if (this.isDisabled(e.target)) return; | ||||||||||||||||||||||||
this.active_img_type = type; | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
cudaClickHandler(e, version) { | ||||||||||||||||||||||||
condaCUDAClickHandler(e, version) { | ||||||||||||||||||||||||
if (this.isDisabled(e.target)) return; | ||||||||||||||||||||||||
this.active_cuda_ver = version; | ||||||||||||||||||||||||
this.active_conda_cuda_ver = version; | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
pipCUDAClickHandler(e, version) { | ||||||||||||||||||||||||
if (this.isDisabled(e.target)) return; | ||||||||||||||||||||||||
this.active_pip_cuda_ver = version; | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
dockerCUDAClickHandler(e, version) { | ||||||||||||||||||||||||
if (this.isDisabled(e.target)) return; | ||||||||||||||||||||||||
this.active_docker_cuda_ver = version; | ||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
pythonClickHandler(e, version) { | ||||||||||||||||||||||||
if (this.isDisabled(e.target)) return; | ||||||||||||||||||||||||
this.active_python_ver = version; | ||||||||||||||||||||||||
|
@@ -789,7 +808,7 @@ | |||||||||||||||||||||||
return; | ||||||||||||||||||||||||
} | ||||||||||||||||||||||||
this.active_additional_packages = [...this.active_additional_packages, package]; | ||||||||||||||||||||||||
if (this.active_additional_packages.includes("TensorFlow") && (this.active_cuda_ver !== "12.0")) this.active_cuda_ver = "12.0"; | ||||||||||||||||||||||||
if (this.active_additional_packages.includes("TensorFlow") && (!this.active_conda_cuda_ver.includes("12.0"))) this.active_conda_cuda_ver = "12.0 - 12.2"; | ||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||
}, | ||||||||||||||||||||||||
copyToClipboard() { | ||||||||||||||||||||||||
let range = document.createRange(); | ||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.