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.1.tar.gz (8.3 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.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jtop_installer-0.1.1.tar.gz
  • Upload date:
  • Size: 8.3 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.1.tar.gz
Algorithm Hash digest
SHA256 e2de8257752048f347440b56fc9d45a905accefd2bef4b79df6074022c940b2e
MD5 b3a9f9d3dfe622dc5b7cd4270453ea4c
BLAKE2b-256 cc82d659497125b495b5128514cf9d6be6083dbff52874c36771547a39c46801

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jtop_installer-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e04d7ecea909017f7cb4096d644f75668e07755f8e564876ee0db4d1f9b44b1
MD5 5e43e97f054a3aa6bce4571b7ec7b7d5
BLAKE2b-256 b5134c746534c5f987d920a8e4fa49013323b3e27634fb86787c59c43fb924da

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