Skip to content

Commit b1c20aa

Browse files
committed
Small fix
1 parent d504261 commit b1c20aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ deps =
3939
commands =
4040
# if CUDA is available, install the appropriate cupy version
4141
bash -c 'if command -v nvcc >/dev/null 2>&1; then \
42-
CUDA_MAJOR=$$(python - <<'"'"'PY'"'"'\nimport re\nimport subprocess\noutput = subprocess.check_output(["nvcc", "--version"], text=True)\nmatch = re.search(r"release\\s+(\\d+)\\.", output)\nprint(match.group(1) if match else "")\nPY\n); \
42+
CUDA_MAJOR=$$(nvcc --version | sed -n "s/.*release \([0-9][0-9]*\)\..*/\1/p" | head -n 1); \
4343
if [ "$$CUDA_MAJOR" = "12" ]; then \
4444
python -m pip install -U cupy-cuda12x; \
4545
elif [ "$$CUDA_MAJOR" = "13" ]; then \

0 commit comments

Comments
 (0)