YunKan-Trainer

YunKan-Trainer

Docker app from 田继业's Repository

Overview

YunKan-Trainer (云瞰本地自训练) — an optional NVIDIA-GPU sidecar for YunKan that fine-tunes the on-device object-detection model on YOUR cameras' own footage, entirely on your LAN. It is a separate, single-purpose container: install it only when you want a detector that is more accurate for the specific people / vehicles / packages at your door, in your lighting.

How it works: in the YunKan web admin you confirm or correct the detector's pre-labels (active-learning). When you have enough samples you start a training job — the main YunKan container ships the dataset to this trainer over HTTP, the trainer fine-tunes with ultralytics on your NVIDIA GPU, exports an ONNX model, and hands it back. Nothing leaves your network.

This container is not a full app — it exposes a small HTTP API on port 28900 (a /health endpoint reports GPU / device / busy). It does the training; the main YunKan container drives it. You do not open a normal web UI here.

Requirements:

  1. An NVIDIA GPU + the Unraid "NVIDIA Driver" plugin (reboot, confirm nvidia-smi works on the host). This template already sets --runtime=nvidia and the NVIDIA_* env vars — no extra GPU config needed.
  2. The main YunKan container running on your LAN (any variant). In its Settings → Training page, enter this machine's trainer URL http://this-host-ip:28900 and the same TRAINER_TOKEN you set below.
  3. The image is several GB (it bundles torch + ultralytics + the base weights), so the first pull takes a while.

Training is serial (one job at a time; the GPU is used exclusively while a job runs). Each job runs in a short-lived subprocess that fully releases GPU memory and RAM the moment it finishes — when idle the container just polls and sleeps, using almost nothing, so it can safely share a GPU with other workloads between jobs.

No NVIDIA GPU? You do not need this container — you can still fine-tune on on-demand cloud compute from within the YunKan admin.

Keywords: YunKan, 云瞰, self-training, fine-tuning, active learning, custom model, on-device AI, edge AI, object detection, NVIDIA, CUDA, GPU, ultralytics, YOLO, trainer, local training, privacy, self-hosted, NVR AI.

Install YunKan-Trainer on Unraid in a few clicks.

Find YunKan-Trainer in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for YunKan-Trainer Review the template variables and paths Click Install

Requirements

Install the Unraid "NVIDIA Driver" plugin so `nvidia-smi` works on the host, otherwise the trainer cannot use the GPU. Also install the main YunKan container (any variant) on your LAN and point its Settings → Training page at this trainer's URL + token.

Download Statistics

27
Total Downloads

Related apps

Details

Repository
martin888/yunkan-trainer:latest
Last Updated2026-07-09
First Seen2026-07-09

Runtime arguments

Web UI
http://[IP]:[PORT:28900]/health
Network
host
Shell
sh
Privileged
false
Extra Params
--runtime=nvidia --shm-size 1gb

Template configuration

Trainer token (shared secret)Variable

Shared secret that authenticates the main YunKan container to this trainer (Bearer token). REQUIRED — an unprotected GPU training endpoint on your LAN can be abused to run arbitrary training jobs. Generate one in the main YunKan admin (Settings → Training → 'Generate token'), paste it here AND into that same page. Use a long random value if you set it by hand.

Target
TRAINER_TOKEN
NVIDIA_VISIBLE_DEVICESVariable

Which GPU(s) the trainer may use. On multi-GPU hosts set this to a specific 'GPU-xxxx' UUID (`nvidia-smi -L` to list); default is all.

Default
all
Value
all
NVIDIA_DRIVER_CAPABILITIESVariable

GPU capabilities to enable: compute (CUDA training) + utility (nvidia-smi, used by the /health GPU probe). Video/NVDEC is not needed — the trainer trains on image frames, it does not decode video.

Default
compute,utility
Value
compute,utility
Listen portVariable

HTTP port the trainer listens on. Must match the port in the trainer URL you enter in the main YunKan admin. If you change it, also update the port mapping below and the WebUI.

Target
TRAINER_PORT
Default
28900
Value
28900
Max dataset upload (MB)Variable

Upper bound on the dataset upload the trainer accepts, guarding against a runaway upload filling the disk. Raise it only if you train on very large datasets.

Target
SKYVIEW_TRAINER_MAX_UPLOAD_MB
Default
4096
Value
4096
Time zone (TZ)Variable

Container time zone. Affects log timestamps only.

Target
TZ
Default
Etc/UTC
Value
Etc/UTC
Trainer API portPorttcp

HTTP API the main YunKan container calls (submit job / poll / download model). The main container must be able to reach this host on this port. (With host networking this is informational — the port is exposed directly on the host.)

Target
28900
Default
28900
Value
28900
Work directory (optional, persists in-flight jobs)Pathrw

OPTIONAL. The trainer needs no shared volume — datasets and models are transferred over HTTP. Mapping /work only persists an in-progress training job across a container restart (a multi-epoch job can run for hours); finished models are downloaded by the main container immediately, so losing this is not data loss. Leave unmapped for a truly stateless trainer.

Target
/work
Default
/mnt/user/appdata/yunkan-trainer/work
Value
/mnt/user/appdata/yunkan-trainer/work