Skip to content
This repository was archived by the owner on Jan 27, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
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
10 changes: 10 additions & 0 deletions build2cmake/src/config/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ pub struct General {
pub cuda_maxver: Option<Version>,

pub cuda_minver: Option<Version>,

pub hub: Option<Hub>,
}

#[derive(Debug, Deserialize, Serialize)]
#[serde(deny_unknown_fields, rename_all = "kebab-case")]
pub struct Hub {
pub repo_id: Option<String>,
pub branch: Option<String>,
}

#[derive(Debug, Deserialize, Clone, Serialize)]
Expand Down Expand Up @@ -249,6 +258,7 @@ impl General {
universal,
cuda_maxver: None,
cuda_minver: None,
hub: None,
}
}
}
Expand Down
16 changes: 16 additions & 0 deletions lib/gen-flake-outputs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,22 @@ in
chmod -R +w build
'';

build-and-upload =
let
buildToml = build.readBuildConfig path;
repo_id = lib.attrByPath [
"general"
"hub"
"repo-id"
] "kernels-community/${buildToml.general.name}" buildToml;
branch = lib.attrByPath [ "general" "hub" "branch" ] "main" buildToml;
in
writeScriptBin "build-and-upload" ''
#!/usr/bin/env bash
set -euo pipefail
${bestBuildSet.pkgs.python3.pkgs.kernels}/bin/kernels upload --repo-id ${repo_id} --branch ${branch} ${bundle}
'';

ci =
let
setsWithFramework =
Expand Down
11 changes: 11 additions & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ final: prev: {
(
python-self: python-super: with python-self; {
kernel-abi-check = callPackage ./pkgs/python-modules/kernel-abi-check { };

kernels = python-super.kernels.overrideAttrs (oldAttrs: {
version = "unstable";

src = final.fetchFromGitHub {
owner = "huggingface";
repo = "kernels";
rev = "5d21b86a5d611100c10c10b79ffa7965edf567fd";
sha256 = "sha256-lKQUVbjhpeXKj1SeZRxgPSsOtBUZ7zQeO6pRoA1h+W8=";
};
});
}
)
];
Expand Down
Loading