comparison qwen3_vl/runtime.bzl @ 277:1d99147f520c

Merge Qwen services and infinite canvas heads
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 17:01:40 -0700
parents 78699f810817
children
comparison
equal deleted inserted replaced
276:b55c22cff335 277:1d99147f520c
1 def _cuda_runtime_impl(ctx):
2 output = ctx.actions.declare_directory(ctx.label.name)
3 inputs = ctx.files.llama_runtime + ctx.files.cuda_runtime
4 args = ctx.actions.args()
5 args.add(output.path)
6 args.add_all([file.path for file in inputs])
7
8 ctx.actions.run_shell(
9 inputs = inputs,
10 outputs = [output],
11 arguments = [args],
12 command = """
13 set -euo pipefail
14 output="$1"
15 shift
16 mkdir -p "$output"
17 for input in "$@"; do
18 cp -L "$input" "$output/$(basename "$input")"
19 done
20 chmod 0555 "$output"/*.exe
21 chmod 0444 "$output"/*.dll
22 """,
23 progress_message = "Assembling llama.cpp CUDA runtime",
24 )
25
26 return [
27 DefaultInfo(
28 files = depset([output]),
29 runfiles = ctx.runfiles(files = [output]),
30 ),
31 ]
32
33 cuda_runtime = rule(
34 implementation = _cuda_runtime_impl,
35 attrs = {
36 "llama_runtime": attr.label(
37 allow_files = True,
38 mandatory = True,
39 ),
40 "cuda_runtime": attr.label(
41 allow_files = True,
42 mandatory = True,
43 ),
44 },
45 )