AIToday
Open-Source AIQiita 機械学習Published: Oct 19, 2026, 16:00 JST

Pi 4 log-monitoring ML moves to Ubuntu VPS via Docker Hub

Pi 4 log-monitoring ML moves to Ubuntu VPS via Docker Hub

3 Key Points

  1. What happened

    The guide walks through tagging the raspberrypi4-secure-trainer:latest image, pushing it to a private Docker Hub repository, pulling it on an Ubuntu Server 24.04 LTS VPS, and running training through Docker Compose with a 2g memory cap.

  2. Why it matters

    The migration lets the training container run on an always-on VPS instead of a local machine, while historical logs and trained models persist in mounted VPS folders and the Pi continues its existing log collection and notification role.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The guide builds directly on a previous setup in which a BUFFALO WSR-1500AX2L router's Syslog is collected on a Raspberry Pi 4, aggregated and judged in Python, and reported by Gmail. In that arrangement the Pi handles always-on monitoring while a Windows PC's Docker environment builds the machine learning model. The new article keeps that division but moves the training location off the PC so training can run without the PC being left on.

The migration deliberately separates what travels in the image from what does not. Python, dependencies, training code, and tests go into the image and through Docker Hub, while compose.yaml, logs, models, evaluation results, and credentials are handled separately. The guide notes that volumes and bind mounts are not included when an image is pushed, so image transfer and data migration are treated as two distinct tasks. It also uses architecture checks — linux/amd64 — to keep the image compatible with the target VPS.

On the VPS side, the training container runs with no network, a read-only root filesystem, and only the models folder writable, with the data folder mounted read-only. A successful run is not the same as production-ready quality, because the existing train.py counts anomalies without ground-truth labels and therefore does not compute Precision or Recall. Model transfer back to the Pi is left as a manual step after a human quality review, and a dry-run notification mode is used before switching the Pi's configuration to live SMTP.

FAQ
Does the Raspberry Pi itself get moved to the VPS?
No. The Pi keeps running its existing Python virtual environment and systemd-based monitoring, and the VPS training container runs independently.
What Docker Hub access does the VPS need?
The guide recommends separate personal access tokens: Read and Write for the local PC that pushes images, and Read-only for the VPS that pulls them.
How does the VPS reach logs stored on the Pi?
Both the VPS and the Pi join Tailscale, and the VPS uses ordinary SSH to the Pi's VPN-side IP address rather than the home LAN address.
Qiita 機械学習Read Original Article

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleOpenCode breach may expose API keys, hitting 1.4% of Console users