You need to sign in or sign up before continuing.
Unverified Commit c31db6d6 authored by Andrey Talman's avatar Andrey Talman Committed by GitHub
Browse files

Using conda metapackage when installing cuda 11.6 and 11.7 (#6371)

* Testing conda metapackage

* Testing

* Testing pytorch-cuda

* Testing

* Testing

* Testing

* Testing

* Testing

* Using new metapackage

* Testing

* Simplifing logic

* Further simplifying
parent 6e535db2
...@@ -22,11 +22,10 @@ else ...@@ -22,11 +22,10 @@ else
echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION" echo "Using CUDA $CUDA_VERSION as determined by CU_VERSION"
version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")" version="$(python -c "print('.'.join(\"${CUDA_VERSION}\".split('.')[:2]))")"
cuda_toolkit_pckg="cudatoolkit" cudatoolkit="nvidia::cudatoolkit=${version}"
if [[ "$CU_VERSION" == cu116 ]]; then if [[ "$version" == "11.6" || "$version" == "11.7" ]]; then
cuda_toolkit_pckg="cuda" cudatoolkit=" pytorch-cuda=${version}"
fi fi
cudatoolkit="nvidia::${cuda_toolkit_pckg}=${version}"
fi fi
case "$(uname -s)" in case "$(uname -s)" in
......
...@@ -261,8 +261,11 @@ setup_conda_cudatoolkit_constraint() { ...@@ -261,8 +261,11 @@ setup_conda_cudatoolkit_constraint() {
export CONDA_BUILD_VARIANT="cpu" export CONDA_BUILD_VARIANT="cpu"
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu117)
export CONDA_CUDATOOLKIT_CONSTRAINT="- pytorch-cuda=11.7 # [not osx]"
;;
cu116) cu116)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cuda >=11.6,<11.7 # [not osx]" export CONDA_CUDATOOLKIT_CONSTRAINT="- pytorch-cuda=11.6 # [not osx]"
;; ;;
cu113) cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]" export CONDA_CUDATOOLKIT_CONSTRAINT="- cudatoolkit >=11.3,<11.4 # [not osx]"
...@@ -290,8 +293,11 @@ setup_conda_cudatoolkit_plain_constraint() { ...@@ -290,8 +293,11 @@ setup_conda_cudatoolkit_plain_constraint() {
export CMAKE_USE_CUDA=0 export CMAKE_USE_CUDA=0
else else
case "$CU_VERSION" in case "$CU_VERSION" in
cu117)
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda=11.7"
;;
cu116) cu116)
export CONDA_CUDATOOLKIT_CONSTRAINT="cuda=11.6" export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda=11.6"
;; ;;
cu113) cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3" export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit=11.3"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment