Skip to content

Instantly share code, notes, and snippets.

View ckandoth's full-sized avatar

Cyriac Kandoth ckandoth

View GitHub Profile
@ckandoth
ckandoth / asus-g16.md
Last active November 9, 2026 17:08
Private AI Inference Server

Private AI Inference Server

This guide documents the OS installation, network isolation, security hardening, and power stabilization of an ASUS ROG Zephyrus G16 running CachyOS as a dedicated AI inference server.

1. Server Hardware

  • Hostname: asus-g16
  • Model: ASUS ROG Zephyrus G16 Laptop
  • CPU: Intel Core Ultra 9 285H (16 cores, 16 threads, up to 5.4 GHz)
  • RAM: 64GB LPDDR5X 7467 MT/s
@ckandoth
ckandoth / macos-agent.md
Created July 29, 2026 11:09
Fully local AI agent on MacOS

These steps should in theory work on any MacOS device. If you don't have Homebrew installed, see brew.sh to install that before proceeding.

Open Terminal and install llama.cpp. Then use it to list available inference devices, usually Metal or CPU.

brew install llama.cpp
llama serve --list-devices

To test agentic tool calling, use llama.cpp to download and serve a small but capable model (Gemma 4 12B) with access to basic tools using arg --tools all. This creates API/MCP endpoints at port 8080 for programmatic access but also a nice web UI with agentic features. The args -ctk q4_0 -ctv q4_0 perform 4-bit quantization of KV-cache (working memory) to reduce RAM usage, but also as recommended for models with Quantization-Aware Training (QAT).

@ckandoth
ckandoth / windows-agent.md
Last active October 21, 2026 17:37
Fully local AI agent on Windows

All these commands ran successfully on a desktop PC with an Nvidia GPU and on a handheld PC with an AMD GPU, both running Windows 11 Pro 26H2. But in theory, these should work on any Windows 10/11 PC with any GPU, as long as your GPU drivers are up to date.

Before you start, check how much VRAM (GPU memory) you have in Task Manager > Performance > GPU > Dedicated GPU memory. A GPU with 12GB or more is a good fit for this guide. With 8GB or less it will still work, but slower. You'll also need a few GB of free disk space for model downloads.

Open PowerShell and install pixi for package management.

winget install prefix-dev.pixi
@ckandoth
ckandoth / linux-agent.md
Last active November 9, 2026 15:52
Fully local AI agent on CachyOS using an Nvidia GPU with 24GB VRAM.

Purpose

Fully local AI agent on CachyOS using an Nvidia GPU with 24GB VRAM, served securely over Tailscale HTTPS with a mobile PWA interface.

Tools

All these commands were tested on the latest rolling release of CachyOS on a 2025 ASUS ROG Zephyrus G16 with a 16-core Intel Ultra 9 285H, 64GB DDR5 RAM, and an Nvidia RTX 5090 Mobile. But this guide should work for any Nvidia GPU with 24GB VRAM like the A10 or RTX A5500.

Create ~/.local/bin if it wasn't already and add it to $PATH in your dotfiles.

@ckandoth
ckandoth / az-nirvana.md
Created October 20, 2025 07:42
Prototype Illumina's Nirvana on Dragen Pay-As-You-Go (PAYG) VMs on Azure

Purpose

Prototype Illumina's Nirvana on Dragen Pay-As-You-Go (PAYG) VMs on Azure.

Prerequisites

  1. Sign up for an Azure subscription at this link if you don't already have one.
  2. Follow these instructions to register resource providers Microsoft.Network, Microsoft.Storage, and Microsoft.Compute. Strictly speaking, you don't need Microsoft.Storage for the steps in this guide. But in a production environment, it is recommended to use blob storage for inputs/outputs. You should also upload Nirvana annotation source files into your own blob storage account so that you can quickly deploy them into multiple ephemeral VMs that run Nirvana in parallel on each sample.
  3. Visit this page, login if needed, and increase your Quota for `To
@ckandoth
ckandoth / pgscalc_with_wgs_gvcfs.sh
Last active July 22, 2026 13:32
Prototype a bioinformatics pipeline to calculate Polygenic Risk Scores (PRS) using WGS gVCFs
# GOAL: Prototype a bioinformatics pipeline to calculate Polygenic Risk Scores (PRS) using WGS gVCFs.
# Let's use pgscalc (https://github.com/pgscatalog/pgsc_calc) a nextflow pipeline to calculate PRS, given PR weights and
# a multi-sample VCF. Variant allele weights can be specified either as PGS Catalog IDs (--pgs_id) and/or as custom scoring
# files (--scorefile). pgscalc can also perform liftover if scoring files use a different reference genome build than the
# input VCFs (--liftover --target_build).
# Steps below were tested on Ubuntu 24.04. But should work fine with any Linux server using bash.
# ----- #
@ckandoth
ckandoth / dgn_np10_errors.md
Last active October 14, 2025 05:43
Reproduce sporadic "double free" errors by Dragen on Azure NP10 VMs

Purpose

Reproduce the double free or corruption (fasttop) error from Dragen 4.3.6 on their CentOS 7.9 image on Azure NP10 VMs.

Update (Mar 2025)

This error was linked to Dragen's code for streaming FASTQs from Azure blob storage. As a workaround, we now use azcopy to copy FASTQs onto VM local storage before alignment, which significantly reduces runtime too. The errors also disappear in AlmaLinux 8, which all newer Dragen VM images are based on.

Prerequisites

@ckandoth
ckandoth / az-dgn.md
Last active September 6, 2026 01:04
Azure stack for Illumina Dragen PAYG

Purpose

Build an Azure stack to operate NP-series VMs on Azure with Dragen's pay-as-you-go (PAYG) license.

Prerequisites

All the commands in this repo were tested on Ubuntu 24.04 in WSL2 with these dotfiles, but you should be fine with Bash in any Linux environment.

  • Sign up for an Azure subscription at this link if you don't already have one.
  • Follow these instructions to register resource providers Microsoft.Network, Microsoft.Storage, and Microsoft.Compute.
@ckandoth
ckandoth / dx-ngs.md
Last active November 5, 2026 20:51
Clinical NGS bioinformatics server at reasonable cost and TAT

Purpose

A high-performance Linux workstation and compute desktop featuring full-disk encryption (LUKS2) that auto-unlocks seamlessly via TPM2 while strictly enforcing UEFI Secure Boot.

Hardware and OS

Configured on a Dell XPS 8960 desktop. The system provides strong single-thread and multi-threaded CPU throughput, modern AVX2 compute, and an Ada Lovelace GPU with 12GB VRAM suitable for local inference and hardware-accelerated workloads.

  • Intel Core i7-14700K (8P cores, 12E cores, OEM liquid cooled)
  • 64GB (2x 32GB) DDR5-5600 Memory (CL46)
@ckandoth
ckandoth / ensembl_vep_112_with_offline_cache.md
Created May 30, 2024 19:27
Install Ensembl's VEP v112 with local cache for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

The official instructions to install VEP have never worked well from the United States because of the flaky network connection to their FTP servers in the UK. So, we will instead use conda to install VEP and its dependencies and then manually download VEP caches and reference genomes using rsync.

If you don't already have conda, download and install it into $HOME/miniconda3:

curl -sL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o miniconda.sh
bash miniconda.sh -bup $HOME/minic