Skip to content

Commit 68a2cf1

Browse files
authored
Merge pull request #240 from gforsyth/rattler
2 parents 0e74f56 + 3aa3a0f commit 68a2cf1

File tree

3 files changed

+69
-67
lines changed

3 files changed

+69
-67
lines changed

ci/build_python.sh

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
#!/bin/bash
2-
# Copyright (c) 2023, NVIDIA CORPORATION.
2+
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
33

44
# Exit script if any command fails
55
set -euo pipefail
66

7-
rapids-configure-conda-channels
8-
9-
source rapids-configure-sccache
10-
117
source rapids-date-string
128

13-
# Print the Rapids environment for debugging purposes
149
rapids-print-env
1510

1611
# Generate version and replace any letter with a hyphen
1712
version=$(rapids-generate-version)
1813
node_version=$(echo "$version" | sed 's/[a-zA-Z]/-\0/' | sed 's/^-//')
1914

15+
RAPIDS_PACKAGE_VERSION=$version
16+
export RAPIDS_PACKAGE_VERSION
17+
2018
# Update the version field in package.json
2119
rapids-logger "Updating version in package.json to $node_version"
2220
jq -e --arg tag "$node_version" '.version=$tag' package.json > package.json.tmp
@@ -25,7 +23,16 @@ mv package.json.tmp package.json
2523
# Generate jupyterlab_nvdashboard/_version.py since hatch version hook isn't working with conda-build
2624
echo "__version__ = '$version'" > jupyterlab_nvdashboard/_version.py
2725

28-
# TODO: Remove `--no-test` flag once importing on a CPU
29-
# node works correctly
30-
rapids-logger "Building JupyterLab NVDashboard conda package"
31-
RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry build --no-test conda/recipes/jupyterlab-nvdashboard
26+
# populates `RATTLER_CHANNELS` array and `RATTLER_ARGS` array
27+
source rapids-rattler-channel-string
28+
29+
rapids-logger "Building jupyterlab-nvdashboard"
30+
31+
rattler-build build --recipe conda/recipes/jupyterlab-nvdashboard \
32+
--test skip \
33+
"${RATTLER_ARGS[@]}" \
34+
"${RATTLER_CHANNELS[@]}"
35+
36+
# remove build_cache directory to avoid uploading the entire source tree
37+
# tracked in https://github.com/prefix-dev/rattler-build/issues/1424
38+
rm -rf "$RAPIDS_CONDA_BLD_OUTPUT_DIR"/build_cache

conda/recipes/jupyterlab-nvdashboard/meta.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION.
2+
schema_version: 1
3+
4+
context:
5+
version: ${{ env.get("RAPIDS_PACKAGE_VERSION") }}
6+
date_string: '${{ env.get("RAPIDS_DATE_STRING") }}'
7+
head_rev: '${{ git.head_rev(".")[:8] }}'
8+
py_version: ${{ env.get("RAPIDS_PY_VERSION") }}
9+
py_buildstring: ${{ py_version | version_to_buildstring }}
10+
11+
package:
12+
name: jupyterlab-nvdashboard
13+
version: ${{ version }}
14+
15+
source:
16+
path: ../../..
17+
18+
build:
19+
noarch: python
20+
string: py${{ py_buildstring }}_${{ date_string }}_${{ head_rev }}
21+
script:
22+
content: |
23+
python -m pip install . -vv
24+
25+
requirements:
26+
host:
27+
- hatch-jupyter-builder>=0.5
28+
- hatch-nodejs-version>=0.3.2
29+
- hatchling>=1.27.0
30+
- jupyterlab>=4.0.0
31+
- nodejs
32+
- pip
33+
- python
34+
run:
35+
- jupyterlab>=4.0.0
36+
- psutil
37+
- pynvml>=12.0.0,<13.0.0a0
38+
- python
39+
40+
tests:
41+
- python:
42+
imports:
43+
- jupyterlab_nvdashboard
44+
pip_check: true
45+
46+
about:
47+
homepage: https://github.com/rapidsai/jupyterlab-nvdashboard
48+
license: BSD-3-Clause
49+
summary: >
50+
NVDashboard is a JupyterLab extension for displaying GPU usage dashboards.
51+
It enables JupyterLab users to visualize system hardware metrics within the
52+
same interactive environment they use for development.

0 commit comments

Comments
 (0)