Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cuda-nvml-dev recipe #22127

Merged
merged 9 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions recipes/cuda-nvml-dev/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
if not exist %PREFIX% mkdir %PREFIX%

move lib\x64\* %LIBRARY_LIB%
move include\* %LIBRARY_INC%
mkdir %PREFIX%\nvml
move nvml\* %PREFIX%\nvml
26 changes: 26 additions & 0 deletions recipes/cuda-nvml-dev/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Install to conda style directories
[[ -d lib64 ]] && mv lib64 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
mkdir -p ${PREFIX}/${targetsDir}
mkdir -p ${PREFIX}/$i
cp -rv $i ${PREFIX}/${targetsDir}
for j in `ls $i`; do
ln -s ../${targetsDir}/$i/$j ${PREFIX}/$i/$j
done
else
cp -rv $i ${PREFIX}
fi
done
47 changes: 47 additions & 0 deletions recipes/cuda-nvml-dev/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{% set name = "cuda-nvml-dev" %}
{% set version = "12.0.76" %}
adibbley marked this conversation as resolved.
Show resolved Hide resolved
{% set platform = "linux-x86_64" %} # [linux64]
{% set platform = "linux-ppc64le" %} # [ppc64le]
{% set platform = "linux-sbsa" %} # [aarch64]
{% set platform = "windows-x86_64" %} # [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") }}
adibbley marked this conversation as resolved.
Show resolved Hide resolved

test:
commands:
- test -f $PREFIX/targets/*/lib/stubs/libnvidia-ml.so # [linux]
- if not exist %LIBRARY_LIB%\nvml.lib 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