-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22127 from adibbley/cuda-nvml-dev
Add cuda-nvml-dev recipe
- Loading branch information
Showing
4 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
if not exist %PREFIX% mkdir %PREFIX% | ||
|
||
move lib\x64\* %LIBRARY_LIB% | ||
move include\* %LIBRARY_INC% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Install to conda style directories | ||
[[ -d lib64 ]] && mv lib64 lib | ||
mkdir -p ${PREFIX}/lib | ||
[[ -d pkg-config ]] && mkdir -p ${PREFIX}/lib && mv pkg-config ${PREFIX}/lib/pkgconfig | ||
[[ -d "$PREFIX/lib/pkgconfig" ]] && sed -E -i "s|cudaroot=.+|cudaroot=$PREFIX|g" $PREFIX/lib/pkgconfig/nvidia-ml-*.pc | ||
|
||
[[ ${target_platform} == "linux-64" ]] && targetsDir="targets/x86_64-linux" | ||
[[ ${target_platform} == "linux-ppc64le" ]] && targetsDir="targets/ppc64le-linux" | ||
[[ ${target_platform} == "linux-aarch64" ]] && targetsDir="targets/sbsa-linux" | ||
|
||
for i in `ls`; do | ||
[[ $i == "build_env_setup.sh" ]] && continue | ||
[[ $i == "conda_build.sh" ]] && continue | ||
[[ $i == "metadata_conda_debug.yaml" ]] && continue | ||
if [[ $i == "lib" ]] || [[ $i == "include" ]]; then | ||
# Headers and libraries are installed to targetsDir | ||
mkdir -p ${PREFIX}/${targetsDir} | ||
mkdir -p ${PREFIX}/$i | ||
cp -rv $i ${PREFIX}/${targetsDir} | ||
# Nothing to be symlinked in $PREFIX/lib | ||
# else | ||
# Skip all other files (only samples here) | ||
# mkdir -p ${PREFIX}/${targetsDir}/${PKG_NAME} | ||
# cp -rv $i ${PREFIX}/${targetsDir}/${PKG_NAME} | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
arm_variant_type: # [aarch64] | ||
- sbsa # [aarch64] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{% set name = "cuda-nvml-dev" %} | ||
{% set version = "12.0.76" %} | ||
{% set cuda_version = "12.0" %} | ||
{% set platform = "linux-x86_64" %} # [linux64] | ||
{% set platform = "linux-ppc64le" %} # [ppc64le] | ||
{% set platform = "linux-sbsa" %} # [aarch64] | ||
{% set platform = "windows-x86_64" %} # [win] | ||
{% set target_name = "x86_64-linux" %} # [linux64] | ||
{% set target_name = "ppc64le-linux" %} # [ppc64le] | ||
{% set target_name = "sbsa-linux" %} # [aarch64] | ||
{% set target_name = "x64" %} # [win] | ||
{% set extension = "tar.xz" %} # [not win] | ||
{% set extension = "zip" %} # [win] | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvml_dev/{{ platform }}/cuda_nvml_dev-{{ platform }}-{{ version }}-archive.{{ extension }} | ||
sha256: 6780e554784bef73050144afe39668e26923d2533c268460c348e0e380d5d048 # [linux64] | ||
sha256: 319b96999d144192094d254f0607debb14118ce206ef7dfeba3d13da1cc805ec # [ppc64le] | ||
sha256: 4aee09e48ecd30b2dcaa9de4eb8af2fcdf36ed040eac50c14f3345a12410b6ec # [aarch64] | ||
sha256: abc366280d0aa1ca047323a3e316270b80ffabb649021184647cd16b44c60a71 # [win] | ||
|
||
build: | ||
number: 0 | ||
skip: true # [osx] | ||
|
||
requirements: | ||
build: | ||
- {{ compiler("c") }} | ||
- {{ compiler("cxx") }} | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
host: | ||
- cuda-version {{ cuda_version }} | ||
run: | ||
- {{ pin_compatible("cuda-version", max_pin="x.x") }} | ||
run_constrained: | ||
- arm-variant * {{ arm_variant_type }} # [aarch64] | ||
|
||
test: | ||
commands: | ||
- test -f $PREFIX/lib/pkgconfig/nvidia-ml-*.pc # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/lib/stubs/libnvidia-ml.so # [linux] | ||
- test -f $PREFIX/targets/{{ target_name }}/include/nvml.h # [linux] | ||
- if not exist %LIBRARY_LIB%\nvml.lib exit 1 # [win] | ||
- if not exist %LIBRARY_INC%\nvml.h exit 1 # [win] | ||
|
||
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: NVML native dev links, headers | ||
description: | | ||
NVML native dev links, headers | ||
doc_url: https://docs.nvidia.com/cuda/index.html | ||
|
||
extra: | ||
recipe-maintainers: | ||
- adibbley |