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 togit+https://github.com/rbonghi/jetson_stats.git. Also settable via theJTOP_REFenvironment variable.install -p / --python VERSION— Python version for the venv (default3.12; uv downloads it if not present).
What install does
- Bootstraps
uvif missing (downloads the official installer via stdlib urllib). - Ensures the
jtopgroup exists. - Creates the venv at
~/.local/share/jtop(uv venv -p 3.12 --seed). - Installs/upgrades jetson-stats into it.
- Optionally symlinks NVIDIA's proprietary
pylibjetsonpower(Thor) from system dist-packages into the venv, if present. - Creates the
/usr/local/bin/jtopsymlink and thejtop.servicesystemd unit, then enables and starts the service.
What upgrade does
- Removes legacy system-wide jtop installs (pip uninstall from every system Python, then force-removes leftovers) — the venv is untouched by this step.
- Falls back to a full
installif uv or the venv is missing/broken. - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2de8257752048f347440b56fc9d45a905accefd2bef4b79df6074022c940b2e
|
|
| MD5 |
b3a9f9d3dfe622dc5b7cd4270453ea4c
|
|
| BLAKE2b-256 |
cc82d659497125b495b5128514cf9d6be6083dbff52874c36771547a39c46801
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e04d7ecea909017f7cb4096d644f75668e07755f8e564876ee0db4d1f9b44b1
|
|
| MD5 |
5e43e97f054a3aa6bce4571b7ec7b7d5
|
|
| BLAKE2b-256 |
b5134c746534c5f987d920a8e4fa49013323b3e27634fb86787c59c43fb924da
|