Skip to content

Dev/uv - #17

Open
romleiaj wants to merge 9 commits into
developfrom
dev/uv
Open

Dev/uv#17
romleiaj wants to merge 9 commits into
developfrom
dev/uv

Conversation

@romleiaj

@romleiaj romleiaj commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Port kamera package to a uv environment (rather than a mix of poetry and legacy).

romleiaj and others added 9 commits July 21, 2026 14:53
* Add try/catch to dat_to_csv, formatting

* Add function to compress jpegs with nvJPEG, and an optional flag to turn it on with /sys/arch/use_nvjpeg.

* Pull in updated PhaseOne image and camera SDK versions that support GPU. Make SensorProfiles location relative, not hardcoded.

* Revert "Pull in updated PhaseOne image and camera SDK versions that support GPU. Make SensorProfiles location relative, not hardcoded."

This reverts commit 043f233. Move phase
one SDK changes to separate branch.

* Fix namespace

* Build in one-step now

* Add more error handling around phase one debayering queues, since they are failing to write to disk. Remove hardcoded path, move into header file.

* Recreate the to_process file each time, guaranteeing all files will be processed.

* Add defaults for use_nvjpeg

* Provisioning updates

* Add script to seed redis config, update provisioning to use it.

* Update defaults

* Have safe default

* Remove local ROS calls in startup

* Update redis default bind

* Move order of aptitude install so only one cache update is required

* Move the KAMERA_DIR env variable into the supervisor conf, so only one location needs modification for startup scripts.

* Create global variables at the supervisord level, consolidating configuration

* Store image tags in a .env variable, less name duplication

* Eliminate the tmuxinator dependency, just call tmux directly.

* Revert KAMERA DIR setting, hard paths are required for supervisor

* Rollback supervisord changes as well.

* Source env directly before docker startup

* Call env.sh only once

* Remove 'version' tags from compose files to comply

* Cleanup roskv, remove benedict dependency, collapse RedisEnvoy into one class. Delete old shims and consul work.

* Pass correct arg to redis envoy

* Update naming convention for hostnames

* Update nayak with new naming convention as well

* Move up hosts to top-level cfg

* Remove cruft, consolidate redis config

* makefile, provisioning updates

* Cleanup docker build chain, add concrete build steps to the makefile

* Begin port to noetic GUI, moving all images to ubuntu 20.04

* Port all WX py2 code to WX py3

* Turn off docker compose 'base' so build order follows depends_on order

* No bake isn't listened to, switch to explicit docker compose builds

* Move GUI supporting packages from py2 -> py3 syntax

* Remove some old scripts

* Remove some unused functions in the GUI, make sure casing matches in docker files

* Remove references to files / dirs that no longer exist

* Remove old syntax from gui.dockerfile

* Modernize gui.dockerfile a little more

* Remove kamera pip install - the gui doesn't need it

* Escape host config queries to support hyphens in hostnames

* Remove custom tini install, use docker's built-in init stack

* Remove local ros calls

* Remove py2 relative imports, use absolute

* Load defaults based on system name, not from within gui

* Add psutil pip package, generate locales so GUI doesn't flop initially

* Move AddSpacer to Add for wx4

* Make config conflict resolution a little more verbose / useful

* Numerous classic -> phoenix GUI fixes

* Move SSD / NAS checks to side thread so GUI doesn't hang, make hosts a subset based on SYSTEM_NAME

* Hopefully a resolution to our mysterious X Windows errors

* Revert last commit, ipc:host seems like the actual solution

* Render font size after pane is created, to avoid clipping text

* More scaling / unsquishing fixes for buttons and panels

* Split INS data into 2 columns for vertical space savings

* Increase width for camera dropdown, make about dialog open

* Squeeze vertical block

* More spacing adjustments.

* Move observer back to its own row, expand camera settings a bit

* Darker gray for disabled controls, spacing changes

* Make sure disabled values are shown

* Remove race condition on detector guage starting red

* Change volume mounts to match

* Use repo dir, not ws dir

* Point to correct logo file

* Spacing

* Change divider

* Move completely to noetic - remove kinetic shims

* Add viame to leader build

* Remove WS_DIR variable, make REPO_DIR use consistent

* Add defaults for debug in provisioning to avoid crashes in certain nodes

* Remove hyphens from hostnames - does not play nicely with ROS. Example: 'center0taiga'

* Move host filtering to a general helper function, use across all nodes that require it

* Update netplans for taiga systems

* Add core to leader docker build

* Move location of netplan yaml

* Reconfigure start/stop scripts to use center/left/right convention, rather than per system unique names

* Update startup script to be more general, new naming scheme

* Add script to install desktop shortcuts

* Add desktop install to leader provision

* Remove unused runscripts, collapse swap dockerd to one script

* Add local push/pull docker config, automatically start registry container on leader machines

* Add kamerad to leader

* Add a docker restart to ansible

* Leave docker configuration for configure step

* Rollback to per-machine netplans, the specificity is needed

* Add sys2 netplan

* Remove eth speed max scripts - obe

* Got a little too carried away, need these scripts

* Make scripts executable, strs be f-strs

* Pin NFS version, make nas mount dir beforehand

* Whoops didn't need that folder creation

* Rollback hosts to a per-machine config, as the NAS requires a distinct IP per machine

* Numerous gui updates to bring it closer to previous behavior

* Let gain breathe a little

* Update some necessary defaults

* Grey out contrast control, as server uses it

* Fix startup spacing

* Shrink observer box, minimize prints

* Some minor GUI adjustments

* Update some defaults, add warning if no pipefile

* Make pipefile loading a little more robust

* More robust host filtering for detectors

* Don't try to copy perms to avoid NAS noise in copy

* We don't use that image manager, change the data migration script

* More gui spacing

* Add ansible for system stop / starts

* Add task to symlink nas to desktop (for convenience)

* Add power management to kamerad, adding supervisor tasks for startup / shutdown. Simplifies the system reboot

* Cleanup old power scripts, update desktop to point at new endpoints

* Cut out threading and redis from power management, just make it a simple stateful REST api.

* Add tailscale to system install

* Define clear boundaries for each configuration file - yaml contains static, system-specific options. system_state.json contains the GUI-specific, more mutable configuration options

* Remove all old license strings, replace GUI license with Apache 2.0.

* Make the icons a little prettier

* Make them a little less scary

* Remove seal icon (it was a  sea lion :( )

* Provisioning updates

* nayak-specific config, no ir or uv cameras

* Add default camera config jsons, change default system state to match

* Add shutter enum mapping for electronic / leaf shutter on phase one cameras

* More configuration updates, move pipefile to within camera_cfgs,

* Numerous GUI changes, the biggest being dropdowns for phase one shutter speed, gain, and aperture.

* Display speed instead of exposure in ms

* If any camera parameter changes, light up the 'set' button so its obvious that has to be pressed. Also make flight number setting more intuitive, don't throw an error at every time

* Make kamerad run on startup, and autorestart. Make kamera_run just launch the gui if the system (roscore) is already up - saving the need for a separate gui desktop icon

* Delete gui icon

* Resolve 2 bugs in phase one camera driver. The 'total' counter is now cache in redis on update, not when an image is processed, removing the 10 frame delay from being present in the display. The 10 frame delay is now emptied when archiving is stopped, also fixing display issues

* Add more color indicators, properly display debayer frames

* The camera config box was hiding some important elements - stretch it out. Now save does the 'finished making changes' and save in one button. Make the main panel dropdown update when that save is hit

* Make sure camera configurations are written to disk on save

* Remove OBE camera models file, pivot to kamera one in gui

* Properly label icons

* Need that new line

* Add 'local stratum 3' to nayak sys config, this should have been updated previously but was not. Allows the systems to synchronize even offline.

* Turn those strings to ints, fixing incorrect yellow INS panel

* Add changelog

* Rollback to unless-stopped so halt properly works

* Add a sleep, remove old files

* Add int wrappers to debug, change dropdown, minor live updates

* Make the shutdown script check for system state, rather than exiting immediately.

* Increase height to show shapefile box

* Restore host_shutdown.sh and host_reboot.sh, still used by the supervisor one-shots that kamerad triggers

* v0.5.0 release
Convert pyproject.toml to a standard [project] table with the hatchling
build backend, raising the supported Python floor to 3.10 (the version
the postproc image runs) and dropping the per-dependency version markers
that floor made necessary. ipdb moves to the dev dependency group.
Remove the now-redundant poetry.lock, setup.py, and requirements.txt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the pip editable install in kamerapy.dockerfile with the
standard uv Docker pattern: the uv binary is copied from the official
distroless image, dependencies are synced from the lockfile in a
cached layer before the source copy, and the project venv is put on
PATH. Add a .dockerignore so a local .venv can't leak into the build
context, and gitignore .venv.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The gui image installs kamera editable with --no-deps under ROS
Noetic's Python 3.8, so pip's metadata check would reject the new
requires-python >= 3.10. Bypass it with --ignore-requires-python;
the modules the GUI imports still run on 3.8.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ively

The conda env (environment.yml) supplies python + GDAL + uv; `make install`
then builds .venv on top of it with uv venv --system-site-packages and
uv sync --frozen. The kamerapy docker image now uses micromamba and the same
make install as the native setup scripts, replacing the Linux-only GDAL
wheel extra, and setup_postproc.{sh,ps1} are thin wrappers around the same
steps for Linux/macOS and Windows.

Pin python-preference = "only-system" in [tool.uv]: uv's default otherwise
substitutes a managed standalone interpreter for the conda one, leaving the
conda GDAL invisible through --system-site-packages. Commit uv.lock, which
--frozen requires, and fix bookworm-slim apt deps (libgl1 + libglib2.0-0;
libgl1-mesa-glx no longer exists in bookworm).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Verified py310 builds exist on conda-forge for linux-64, win-64, and
osx-arm64. Provided via conda like GDAL, so the --system-site-packages venv
sees it with no pyproject/lock change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…teps

The scripts were wrappers around three commands; the README now gives those
directly for Linux/macOS and Windows (which runs the two uv commands from
`make install`, since make usually isn't available there). Use explicit
`conda env create` rather than update-as-create: micromamba's `env update`
errors on a missing env.

Also note GPU pycolmap selection: CUDA builds need driver 575+ (CUDA 12.9),
older drivers silently fall back to CPU, and GPU only matters for full
camera model calibration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pip install -e . into the conda env is the simplest Windows path: one env,
one activation, no uv.lock but pyproject floors keep it sane. Trim install
docs and packaging comments to the essentials.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant