Skip to main content

Bootstrap installer for jetson-stats (jtop): isolated uv venv, system-wide symlink, and systemd service — never touches system site-packages

Project description

jtop-installer

To install jtop-installer which then automatically installs or upgrades Jetson_Stats / JTOP.

curl -LsSf https://raw.githubusercontent.com/whitesscott/jtop_installer/main/bootstrap.py | python3 -

Bootstrap installer for jetson-stats (jtop).

It installs jtop into an isolated uv venv at ~/.local/share/jtop — never into system site-packages — so it works on externally managed Pythons without --break-system-packages. System-wide it only creates:

  • a symlink: /usr/local/bin/jtop~/.local/share/jtop/bin/jtop
  • a systemd unit: /etc/systemd/system/jtop.service

This is a pure-Python replacement for the former install_jtop_torun_without_sudo.sh and upgrade-jtop.sh scripts.

Usage

Run as a regular user (not with sudo — it invokes sudo itself when needed; run sudo -v first if you prefer to prime credentials).

One step, no prerequisites (only python3)

curl -LsSf https://raw.githubusercontent.com/whitesscott/jtop_installer/main/bootstrap.py | python3 -

With no arguments it auto-detects: if jtop already exists (venv, symlink, PATH, or a legacy copy in system/user site-packages or /opt) it runs upgrade, otherwise install. To force one, append install or upgrade after the trailing -.

bootstrap.py downloads this repo's source tarball from GitHub, imports the package from a temporary directory, and runs the CLI — which then bootstraps uv itself if needed. Nothing is installed on the system by the bootstrap itself. Set JTOP_INSTALLER_BRANCH to bootstrap from a branch other than main, or JTOP_INSTALLER_REPO to use a fork.

With uv or pipx already installed

With uv installed:

# Auto-detect (upgrade if jtop exists, install otherwise)
uvx jtop-installer

# Fresh install
uvx jtop-installer install

# Upgrade (also removes any legacy system-wide jtop installs)
uvx jtop-installer upgrade

Or with pipx:

pipx run jtop-installer install

On a machine without uv/pipx, run it straight from the repo with system Python (stdlib only, no dependencies):

python3 -m jtop_installer.cli install

(from this directory; install will bootstrap uv itself if it is missing.)

Options

  • --ref REQUIREMENT — what to install, e.g. jetson-stats (PyPI) or a git URL/branch. Defaults to git+https://github.com/rbonghi/jetson_stats.git. Also settable via the JTOP_REF environment variable.
  • install -p / --python VERSION — Python version for the venv (default 3.12; uv downloads it if not present).

What install does

  1. Bootstraps uv if missing (downloads the official installer via stdlib urllib).
  2. Ensures the jtop group exists.
  3. Creates the venv at ~/.local/share/jtop (uv venv -p 3.12 --seed).
  4. Installs/upgrades jetson-stats into it.
  5. Optionally symlinks NVIDIA's proprietary pylibjetsonpower (Thor) from system dist-packages into the venv, if present.
  6. Creates the /usr/local/bin/jtop symlink and the jtop.service systemd unit, then enables and starts the service.

What upgrade does

  1. Removes legacy system-wide jtop installs (pip uninstall from every system Python, then force-removes leftovers) — the venv is untouched by this step.
  2. Falls back to a full install if uv or the venv is missing/broken.
  3. Stops the service, clears root-owned __pycache__ dirs in the venv, force-reinstalls jetson-stats, refreshes the symlink, restarts the service.

Building / publishing

uv build          # produces dist/*.whl and dist/*.tar.gz
uv publish        # upload to PyPI (requires credentials)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jtop_installer-0.1.2.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jtop_installer-0.1.2-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file jtop_installer-0.1.2.tar.gz.

File metadata

  • Download URL: jtop_installer-0.1.2.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jtop_installer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b76be4f45dac57197928fed32eb297746b82e7aec3c73e5eacadd4f83f981261
MD5 e417da44b4726466c35ca7e7cee3a6f4
BLAKE2b-256 1efb38eae32166b29a7794fe5e9c01eaa101fa027206a2a7d89fb68e7e7e98d0

See more details on using hashes here.

File details

Details for the file jtop_installer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: jtop_installer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jtop_installer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 70ac522f64b8a8a1655305ec24a982e0bfb32fea2d1fff1eaf41732bb4a5ca9d
MD5 5b5e668b4b312e58398cfe923a470698
BLAKE2b-256 e6fc78c3007c03c7921191019a6d400d5994b4e8d60d278dd489d5d17572343a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page