From 202cade07aa36fba3040c23d07472088686464ff Mon Sep 17 00:00:00 2001 From: adibbley Date: Fri, 3 Feb 2023 16:19:04 -0500 Subject: [PATCH 1/6] Adding cuda-compat recipe --- recipes/cuda-compat/build.sh | 16 ++++++++++++ recipes/cuda-compat/meta.yaml | 48 +++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 recipes/cuda-compat/build.sh create mode 100644 recipes/cuda-compat/meta.yaml diff --git a/recipes/cuda-compat/build.sh b/recipes/cuda-compat/build.sh new file mode 100644 index 0000000000000..72f34f6ca7108 --- /dev/null +++ b/recipes/cuda-compat/build.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Install to conda style directories +[[ -d lib64 ]] && mv lib64 lib +mkdir -p ${PREFIX}/cuda-compat + +cp lib/libcuda.so.${PKG_VERSION} ${PREFIX}/cuda-compat +ln -s libcuda.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libcuda.so.1 +ln -s libcuda.so.1 ${PREFIX}/cuda-compat/libcuda.so +cp lib/libnvidia-nvvm.so.${PKG_VERSION} ${PREFIX}/cuda-compat +ln -s libnvidia-nvvm.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libnvidia-nvvm.so.4 +ln -s libnvidia-nvvm.so.4 ${PREFIX}/cuda-compat/libnvidia-nvvm.so +cp lib/libnvidia-ptxjitcompiler.so.${PKG_VERSION} ${PREFIX}/cuda-compat +ln -s libnvidia-ptxjitcompiler.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libnvidia-ptxjitcompiler.so.1 +cp lib/libcudadebugger.so.${PKG_VERSION} ${PREFIX}/cuda-compat +ln -s libcudadebugger.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libcudadebugger.so.1 diff --git a/recipes/cuda-compat/meta.yaml b/recipes/cuda-compat/meta.yaml new file mode 100644 index 0000000000000..66e5de49bee34 --- /dev/null +++ b/recipes/cuda-compat/meta.yaml @@ -0,0 +1,48 @@ +{% set name = "cuda-compat" %} +{% set version = "525.60.13" %} +{% set platform = "linux-x86_64" %} # [linux64] +{% set platform = "linux-ppc64le" %} # [ppc64le] +{% set platform = "linux-sbsa" %} # [aarch64] +{% set extension = "tar.xz" %} # [not win] + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/{{ platform }}/nvidia_driver-{{ platform }}-{{ version }}-archive.{{ extension }} + sha256: a42691822f6e87060da5682a8e0662c86d1b20fbf31d12cb2969b819995e4138 # [linux64] + sha256: 4ad08f8431195580349f4984fae2d93697d2f5572837c1e7ae59c37feab291c8 # [ppc64le] + sha256: 1708ae3ba857559cbfc4e6c06267ed6126eff2c68fa5321a95906f50e984148c # [aarch64] + +build: + number: 0 + skip: true # [osx] + skip: true # [win] + +requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + +test: + commands: + - test -f $PREFIX/cuda-compat/libcuda.so.{{ version }} + - test -L $PREFIX/cuda-compat/libcuda.so.1 + - test -L $PREFIX/cuda-compat/libcuda.so + +about: + home: https://developer.nvidia.com/cuda-toolkit + license_file: LICENSE + license: LicenseRef-NVIDIA-End-User-License-Agreement + license_url: https://docs.nvidia.com/cuda/eula/index.html + summary: CUDA Compatibility Platform + description: | + Package containing all the necessary CUDA driver files related to forward + compatibility. This compatibility enables newer CUDA runtimes to work with + older display drivers. Used for TESLA cards only. + doc_url: https://docs.nvidia.com/cuda/index.html + +extra: + recipe-maintainers: + - adibbley From dabf6fb54cfb9745f147475d5b68b76622d8d06e Mon Sep 17 00:00:00 2001 From: adibbley Date: Wed, 21 Jun 2023 12:28:12 -0400 Subject: [PATCH 2/6] Split out cuda-compat-impl --- recipes/cuda-compat/build.sh | 20 +++++------ recipes/cuda-compat/meta.yaml | 67 ++++++++++++++++++++++++++++------- 2 files changed, 65 insertions(+), 22 deletions(-) diff --git a/recipes/cuda-compat/build.sh b/recipes/cuda-compat/build.sh index 72f34f6ca7108..cb0a66794fd71 100644 --- a/recipes/cuda-compat/build.sh +++ b/recipes/cuda-compat/build.sh @@ -4,13 +4,13 @@ [[ -d lib64 ]] && mv lib64 lib mkdir -p ${PREFIX}/cuda-compat -cp lib/libcuda.so.${PKG_VERSION} ${PREFIX}/cuda-compat -ln -s libcuda.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libcuda.so.1 -ln -s libcuda.so.1 ${PREFIX}/cuda-compat/libcuda.so -cp lib/libnvidia-nvvm.so.${PKG_VERSION} ${PREFIX}/cuda-compat -ln -s libnvidia-nvvm.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libnvidia-nvvm.so.4 -ln -s libnvidia-nvvm.so.4 ${PREFIX}/cuda-compat/libnvidia-nvvm.so -cp lib/libnvidia-ptxjitcompiler.so.${PKG_VERSION} ${PREFIX}/cuda-compat -ln -s libnvidia-ptxjitcompiler.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libnvidia-ptxjitcompiler.so.1 -cp lib/libcudadebugger.so.${PKG_VERSION} ${PREFIX}/cuda-compat -ln -s libcudadebugger.so.${PKG_VERSION} ${PREFIX}/cuda-compat/libcudadebugger.so.1 +cp -v lib/libcuda.so.${DRV_VERSION} ${PREFIX}/cuda-compat +ln -sv libcuda.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libcuda.so.1 +ln -sv libcuda.so.1 ${PREFIX}/cuda-compat/libcuda.so +cp -v lib/libnvidia-nvvm.so.${DRV_VERSION} ${PREFIX}/cuda-compat +ln -sv libnvidia-nvvm.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libnvidia-nvvm.so.4 +ln -sv libnvidia-nvvm.so.4 ${PREFIX}/cuda-compat/libnvidia-nvvm.so +cp -v lib/libnvidia-ptxjitcompiler.so.${DRV_VERSION} ${PREFIX}/cuda-compat +ln -sv libnvidia-ptxjitcompiler.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libnvidia-ptxjitcompiler.so.1 +cp -v lib/libcudadebugger.so.${DRV_VERSION} ${PREFIX}/cuda-compat +ln -sv libcudadebugger.so.${DRV_VERSION} ${PREFIX}/cuda-compat/libcudadebugger.so.1 diff --git a/recipes/cuda-compat/meta.yaml b/recipes/cuda-compat/meta.yaml index 66e5de49bee34..17a60736d5cc1 100644 --- a/recipes/cuda-compat/meta.yaml +++ b/recipes/cuda-compat/meta.yaml @@ -1,5 +1,6 @@ {% set name = "cuda-compat" %} {% set version = "525.60.13" %} +{% set cuda_version = "12.0" %} {% set platform = "linux-x86_64" %} # [linux64] {% set platform = "linux-ppc64le" %} # [ppc64le] {% set platform = "linux-sbsa" %} # [aarch64] @@ -7,7 +8,7 @@ package: name: {{ name|lower }} - version: {{ version }} + version: {{ cuda_version }} source: url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/{{ platform }}/nvidia_driver-{{ platform }}-{{ version }}-archive.{{ extension }} @@ -17,19 +18,61 @@ source: build: number: 0 - skip: true # [osx] - skip: true # [win] + skip: true # [osx or win] + script_env: + - DRV_VERSION={{ version }} -requirements: - build: - - {{ compiler("c") }} - - {{ compiler("cxx") }} +outputs: + - name: cuda-compat + requirements: + run: + - {{ pin_subpackage("cuda-compat-impl", exact=True) }} + test: + commands: + - exit 0 + about: + home: https://developer.nvidia.com/cuda-toolkit + license_file: LICENSE + license: LicenseRef-NVIDIA-End-User-License-Agreement + license_url: https://docs.nvidia.com/cuda/eula/index.html + summary: CUDA Compatibility Platform + description: | + Package containing all the necessary CUDA driver files related to forward + compatibility. This compatibility enables newer CUDA runtimes to work with + older display drivers. Used for TESLA cards only. + doc_url: https://docs.nvidia.com/cuda/index.html -test: - commands: - - test -f $PREFIX/cuda-compat/libcuda.so.{{ version }} - - test -L $PREFIX/cuda-compat/libcuda.so.1 - - test -L $PREFIX/cuda-compat/libcuda.so + - name: cuda-compat-impl + version: {{ version }} + files: + - cuda-compat + requirements: + build: + - {{ compiler("c") }} + - {{ compiler("cxx") }} + test: + commands: + - test -f $PREFIX/cuda-compat/libcuda.so.{{ version }} + - test -L $PREFIX/cuda-compat/libcuda.so.1 + - test -L $PREFIX/cuda-compat/libcuda.so + - test -f $PREFIX/cuda-compat/libnvidia-nvvm.so.{{ version }} + - test -L $PREFIX/cuda-compat/libnvidia-nvvm.so.4 + - test -L $PREFIX/cuda-compat/libnvidia-nvvm.so + - test -f $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.{{ version }} + - test -L $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.1 + - test -f $PREFIX/cuda-compat/libcudadebugger.so.{{ version }} + - test -L $PREFIX/cuda-compat/libcudadebugger.so.1 + about: + home: https://developer.nvidia.com/cuda-toolkit + license_file: LICENSE + license: LicenseRef-NVIDIA-End-User-License-Agreement + license_url: https://docs.nvidia.com/cuda/eula/index.html + summary: CUDA Compatibility Platform + description: | + Package containing all the necessary CUDA driver files related to forward + compatibility. This compatibility enables newer CUDA runtimes to work with + older display drivers. Used for TESLA cards only. + doc_url: https://docs.nvidia.com/cuda/index.html about: home: https://developer.nvidia.com/cuda-toolkit From ef9d9056af942033eb30a208b128a276c7607642 Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Wed, 21 Jun 2023 14:31:35 -0400 Subject: [PATCH 3/6] Apply suggestions from code review Co-authored-by: Bradley Dice --- recipes/cuda-compat/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/cuda-compat/meta.yaml b/recipes/cuda-compat/meta.yaml index 17a60736d5cc1..e41bfab03ee5e 100644 --- a/recipes/cuda-compat/meta.yaml +++ b/recipes/cuda-compat/meta.yaml @@ -39,7 +39,7 @@ outputs: description: | Package containing all the necessary CUDA driver files related to forward compatibility. This compatibility enables newer CUDA runtimes to work with - older display drivers. Used for TESLA cards only. + older display drivers. Used for Tesla cards only. doc_url: https://docs.nvidia.com/cuda/index.html - name: cuda-compat-impl @@ -71,7 +71,7 @@ outputs: description: | Package containing all the necessary CUDA driver files related to forward compatibility. This compatibility enables newer CUDA runtimes to work with - older display drivers. Used for TESLA cards only. + older display drivers. Used for Tesla cards only. doc_url: https://docs.nvidia.com/cuda/index.html about: From f8df2092434bc9c38425af6f964879b851c2b9ab Mon Sep 17 00:00:00 2001 From: adibbley Date: Wed, 21 Jun 2023 14:32:44 -0400 Subject: [PATCH 4/6] Use full cuda version --- recipes/cuda-compat/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-compat/meta.yaml b/recipes/cuda-compat/meta.yaml index e41bfab03ee5e..4075e9ee5b78e 100644 --- a/recipes/cuda-compat/meta.yaml +++ b/recipes/cuda-compat/meta.yaml @@ -1,6 +1,6 @@ {% set name = "cuda-compat" %} {% set version = "525.60.13" %} -{% set cuda_version = "12.0" %} +{% set cuda_version = "12.0.0" %} {% set platform = "linux-x86_64" %} # [linux64] {% set platform = "linux-ppc64le" %} # [ppc64le] {% set platform = "linux-sbsa" %} # [aarch64] From 92763df9ff1df1141e33ed2c03dafcbf4c145a04 Mon Sep 17 00:00:00 2001 From: adibbley <103537006+adibbley@users.noreply.github.com> Date: Wed, 21 Jun 2023 16:07:00 -0400 Subject: [PATCH 5/6] Update recipes/cuda-compat/meta.yaml Co-authored-by: Bradley Dice --- recipes/cuda-compat/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/cuda-compat/meta.yaml b/recipes/cuda-compat/meta.yaml index 4075e9ee5b78e..23b6c0d740db2 100644 --- a/recipes/cuda-compat/meta.yaml +++ b/recipes/cuda-compat/meta.yaml @@ -83,7 +83,7 @@ about: description: | Package containing all the necessary CUDA driver files related to forward compatibility. This compatibility enables newer CUDA runtimes to work with - older display drivers. Used for TESLA cards only. + older display drivers. Used for Tesla cards only. doc_url: https://docs.nvidia.com/cuda/index.html extra: From ce2c174ae44b02e955a3f34836ea273039795c82 Mon Sep 17 00:00:00 2001 From: adibbley Date: Wed, 21 Jun 2023 17:59:59 -0400 Subject: [PATCH 6/6] Rename version to driver_version --- recipes/cuda-compat/meta.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes/cuda-compat/meta.yaml b/recipes/cuda-compat/meta.yaml index 23b6c0d740db2..b8baa0ef72646 100644 --- a/recipes/cuda-compat/meta.yaml +++ b/recipes/cuda-compat/meta.yaml @@ -1,5 +1,5 @@ {% set name = "cuda-compat" %} -{% set version = "525.60.13" %} +{% set driver_version = "525.60.13" %} {% set cuda_version = "12.0.0" %} {% set platform = "linux-x86_64" %} # [linux64] {% set platform = "linux-ppc64le" %} # [ppc64le] @@ -11,7 +11,7 @@ package: version: {{ cuda_version }} source: - url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/{{ platform }}/nvidia_driver-{{ platform }}-{{ version }}-archive.{{ extension }} + url: https://developer.download.nvidia.com/compute/cuda/redist/nvidia_driver/{{ platform }}/nvidia_driver-{{ platform }}-{{ driver_version }}-archive.{{ extension }} sha256: a42691822f6e87060da5682a8e0662c86d1b20fbf31d12cb2969b819995e4138 # [linux64] sha256: 4ad08f8431195580349f4984fae2d93697d2f5572837c1e7ae59c37feab291c8 # [ppc64le] sha256: 1708ae3ba857559cbfc4e6c06267ed6126eff2c68fa5321a95906f50e984148c # [aarch64] @@ -20,7 +20,7 @@ build: number: 0 skip: true # [osx or win] script_env: - - DRV_VERSION={{ version }} + - DRV_VERSION={{ driver_version }} outputs: - name: cuda-compat @@ -43,7 +43,7 @@ outputs: doc_url: https://docs.nvidia.com/cuda/index.html - name: cuda-compat-impl - version: {{ version }} + version: {{ driver_version }} files: - cuda-compat requirements: @@ -52,15 +52,15 @@ outputs: - {{ compiler("cxx") }} test: commands: - - test -f $PREFIX/cuda-compat/libcuda.so.{{ version }} + - test -f $PREFIX/cuda-compat/libcuda.so.{{ driver_version }} - test -L $PREFIX/cuda-compat/libcuda.so.1 - test -L $PREFIX/cuda-compat/libcuda.so - - test -f $PREFIX/cuda-compat/libnvidia-nvvm.so.{{ version }} + - test -f $PREFIX/cuda-compat/libnvidia-nvvm.so.{{ driver_version }} - test -L $PREFIX/cuda-compat/libnvidia-nvvm.so.4 - test -L $PREFIX/cuda-compat/libnvidia-nvvm.so - - test -f $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.{{ version }} + - test -f $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.{{ driver_version }} - test -L $PREFIX/cuda-compat/libnvidia-ptxjitcompiler.so.1 - - test -f $PREFIX/cuda-compat/libcudadebugger.so.{{ version }} + - test -f $PREFIX/cuda-compat/libcudadebugger.so.{{ driver_version }} - test -L $PREFIX/cuda-compat/libcudadebugger.so.1 about: home: https://developer.nvidia.com/cuda-toolkit