Skip to content

Commit 1c12b5c

Browse files
committed
address review comments
1 parent 35715d4 commit 1c12b5c

File tree

5 files changed

+37
-32
lines changed

5 files changed

+37
-32
lines changed

docs/cuopt/source/_static/install-selector.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@
120120
padding: 0;
121121
margin: -1px;
122122
overflow: hidden;
123-
clip: rect(0, 0, 0, 0);
123+
clip-path: inset(50%);
124+
-webkit-clip-path: inset(50%);
124125
white-space: nowrap;
125126
border: 0;
126127
}

docs/cuopt/source/_static/install-selector.js

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,29 +60,21 @@
6060
cu12:
6161
"conda install -c rapidsai -c conda-forge -c nvidia cuopt=" +
6262
V_CONDA +
63-
".* cuda-version=" +
64-
V_CONDA +
65-
".*",
63+
".* cuda-version=12.9",
6664
cu13:
6765
"conda install -c rapidsai -c conda-forge -c nvidia cuopt=" +
6866
V_CONDA +
69-
".* cuda-version=" +
70-
V_CONDA +
71-
".*",
67+
".* cuda-version=13.0",
7268
},
7369
nightly: {
7470
cu12:
7571
"conda install -c rapidsai-nightly -c conda-forge -c nvidia cuopt=" +
7672
V_CONDA_NEXT +
77-
".* cuda-version=" +
78-
V_CONDA_NEXT +
79-
".*",
73+
".* cuda-version=12.9",
8074
cu13:
8175
"conda install -c rapidsai-nightly -c conda-forge -c nvidia cuopt=" +
8276
V_CONDA_NEXT +
83-
".* cuda-version=" +
84-
V_CONDA_NEXT +
85-
".*",
77+
".* cuda-version=13.0",
8678
},
8779
},
8880
container: {
@@ -136,29 +128,21 @@
136128
cu12:
137129
"conda remove cuopt-thin-client --yes 2>/dev/null; conda install -c rapidsai -c conda-forge -c nvidia libcuopt=" +
138130
V_CONDA +
139-
".* cuda-version=" +
140-
V_CONDA +
141-
".*",
131+
".* cuda-version=12.9",
142132
cu13:
143133
"conda remove cuopt-thin-client --yes 2>/dev/null; conda install -c rapidsai -c conda-forge -c nvidia libcuopt=" +
144134
V_CONDA +
145-
".* cuda-version=" +
146-
V_CONDA +
147-
".*",
135+
".* cuda-version=13.0",
148136
},
149137
nightly: {
150138
cu12:
151139
"conda install -c rapidsai-nightly -c conda-forge -c nvidia libcuopt=" +
152140
V_CONDA_NEXT +
153-
".* cuda-version=" +
154-
V_CONDA_NEXT +
155-
".*",
141+
".* cuda-version=12.9",
156142
cu13:
157143
"conda install -c rapidsai-nightly -c conda-forge -c nvidia libcuopt=" +
158144
V_CONDA_NEXT +
159-
".* cuda-version=" +
160-
V_CONDA_NEXT +
161-
".*",
145+
".* cuda-version=13.0",
162146
},
163147
},
164148
container: null,
@@ -237,6 +221,13 @@
237221
},
238222
};
239223

224+
var SUPPORTED_METHODS = {
225+
python: ["pip", "conda", "container"],
226+
c: ["pip", "conda"],
227+
server: ["pip", "conda", "container"],
228+
cli: ["pip", "conda"],
229+
};
230+
240231
function getSelectedValue(name) {
241232
var el = document.querySelector('input[name="' + name + '"]:checked');
242233
return el ? el.value : "";
@@ -248,6 +239,7 @@
248239
var release = getSelectedValue("cuopt-release");
249240
var cuda = getSelectedValue("cuopt-cuda");
250241

242+
/* CLI uses libcuopt (c) install; cuopt_cli is shipped with libcuopt. */
251243
if (iface === "cli") {
252244
iface = "c";
253245
}
@@ -279,9 +271,23 @@
279271
function updateVisibility() {
280272
var method = getSelectedValue("cuopt-method");
281273
var iface = getSelectedValue("cuopt-iface");
274+
var allowed = SUPPORTED_METHODS[iface] || [];
275+
var methodInputs = document.querySelectorAll('input[name="cuopt-method"]');
276+
methodInputs.forEach(function (input) {
277+
var enabled = allowed.indexOf(input.value) !== -1;
278+
input.disabled = !enabled;
279+
var label = input.closest("label");
280+
if (label) label.style.display = enabled ? "" : "none";
281+
});
282+
if (allowed.indexOf(method) === -1 && allowed.length) {
283+
var fallback = document.querySelector('input[name="cuopt-method"][value="' + allowed[0] + '"]');
284+
if (fallback) {
285+
fallback.checked = true;
286+
method = allowed[0];
287+
}
288+
}
282289
var cudaRow = document.getElementById("cuopt-cuda-row");
283290
var releaseRow = document.getElementById("cuopt-release-row");
284-
285291
var showCuda = (method === "pip" || method === "conda" || method === "container") && iface !== "cli";
286292
cudaRow.style.display = showCuda ? "table-row" : "none";
287293
releaseRow.style.display = iface !== "cli" ? "table-row" : "none";

docs/cuopt/source/conf.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,6 @@ def run(self):
405405

406406
def write_install_version_js(app):
407407
"""Write install selector version from cuopt.__version__ to output _static."""
408-
import os
409-
410408
outdir = getattr(app.builder, "outdir", None) or getattr(
411409
app.config, "outdir", None
412410
)

docs/cuopt/source/cuopt-cli/quick-start.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Quickstart Guide
33
=================
44

5-
cuopt_cli is built as part of the libcuopt package. Choose your install method below; the selector is pre-set for the CLI (it uses the same libcuopt install). Copy the command and run it in your environment.
5+
cuopt_cli is built as part of the libcuopt package. Choose your install method below; the selector is pre-set for the CLI (it uses the same libcuopt install). Copy the command and run it in your environment. See :doc:`../install` for all interfaces and options.
66

77
Installation
88
============

docs/cuopt/source/install.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ Installation
44

55
Choose your interface, install method, and options below to get the exact install command. Ensure your system meets the :doc:`system-requirements` before installing.
66

7-
Install selector
7+
Install Selector
88
================
99

1010
.. install-selector::
1111

12-
Quick starts
13-
============
12+
Quick Start Guides
13+
==================
1414

1515
If the selector does not load or you prefer step-by-step guides, use the quick-start pages for each interface:
1616

0 commit comments

Comments
 (0)