Mercurial
comparison qwen3_vl/runtime.bzl @ 275:78699f810817
Add Qwen3-VL and WebRTC dictation services
Add Bazel targets for the CUDA-backed Qwen3-VL server and a local WebRTC faster-whisper dictation service.
Co-authored-by: Copilot <[email protected]>
Copilot-Session: e3d8cb06-6c95-4ae0-9757-651d3796ab00
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Mon, 17 Aug 2026 10:58:47 -0700 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 274:c9be578316a6 | 275:78699f810817 |
|---|---|
| 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 ) |