Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2154 commits
Select commit Hold shift + click to select a range
16ea50e
transform to matrix, small cleanup
leshy Dec 18, 2025
16ec284
statistical cleanup
leshy Dec 18, 2025
a9a3dd1
Merge branch 'unitree-agents2-skill-integration' into unitree-agents2…
paul-nechifor Dec 18, 2025
cb7bfe1
general hidden point filtering
leshy Dec 18, 2025
b2448c2
raycast tests
leshy Dec 18, 2025
62a2966
checkpoint
leshy Dec 18, 2025
61479ea
detection class rewrite
leshy Dec 18, 2025
c7da193
implementing dedicated Detection2D type
leshy Dec 18, 2025
99f215f
further work on detection type
leshy Dec 18, 2025
dc1e560
type cleanup
leshy Dec 18, 2025
c9d42e1
detection2d, detection3d type checkpoint
leshy Dec 18, 2025
e31c4f2
added pointcloud2 ros conversion and cameraInfo dimos msgs, tested g1…
alexlin2 Dec 18, 2025
2f14da9
CI code cleanup
alexlin2 Dec 18, 2025
df54a75
add human input through human cli
paul-nechifor Dec 18, 2025
85cbf92
remove panels from mujoco window
paul-nechifor Dec 18, 2025
0854df7
temp checkpoint
leshy Dec 18, 2025
b6e281c
better replay
leshy Dec 18, 2025
53ef804
fix kwargs calls
paul-nechifor Dec 18, 2025
e5db1ca
Ensure CudaImage can convert DEPTH16 and DEPTH appropriately to BGR
mdaiter Dec 18, 2025
a1faf0e
Ensure default read-in is correct
mdaiter Dec 18, 2025
429a9b5
CI code cleanup
mdaiter Dec 18, 2025
fa6c6fa
recorded tests
paul-nechifor Dec 18, 2025
dbc97b8
CI code cleanup
paul-nechifor Dec 18, 2025
6042b32
fix
paul-nechifor Dec 18, 2025
0db2467
fix imports
paul-nechifor Dec 18, 2025
48869ce
Merge branch 'dev' into unitree-agents2-skill-integration-paul
paul-nechifor Dec 18, 2025
8894127
LCM SHM encode for depth image
mdaiter Dec 18, 2025
5edb3c0
CI code cleanup
mdaiter Dec 18, 2025
12020da
Merge branch 'dev' into spatial-object-localization
leshy Dec 18, 2025
522dd7f
merge fixes
leshy Dec 18, 2025
23e7099
silence unnecessary unitree go 2 tricks
paul-nechifor Dec 17, 2025
506032d
pSHMTransport to LCMTransport
paul-nechifor Dec 17, 2025
d5b585f
fix Detection2DArray
paul-nechifor Dec 17, 2025
db95d98
LCM SHM encode for depth image
mdaiter Dec 18, 2025
3f5e59a
LCM SHM encode for depth image
mdaiter Dec 18, 2025
07151b4
Reverting to LCM
mdaiter Dec 18, 2025
a3024a9
fixed replay
leshy Dec 18, 2025
3b1778b
split into module2d and module3d
leshy Dec 18, 2025
95f66fa
fix
paul-nechifor Dec 18, 2025
8513d7b
CI code cleanup
paul-nechifor Dec 18, 2025
88fcf03
test fix
leshy Dec 18, 2025
be9c962
better imageannotations
leshy Dec 18, 2025
ee96b7d
better image->detection association models
leshy Dec 18, 2025
af423c1
major structure cleanup
leshy Dec 18, 2025
03e1c47
full integration of new structure
leshy Dec 18, 2025
3e2264c
str repr
leshy Dec 18, 2025
797d00c
center, distance calculations
leshy Dec 18, 2025
73bb93d
checkpoint
leshy Dec 18, 2025
3fe1f61
db module, objects carry images
leshy Dec 18, 2025
cc41e66
emitting cropped image
leshy Dec 18, 2025
fa54abc
fix getattr
paul-nechifor Dec 18, 2025
ceb8a00
use one loop per test
paul-nechifor Dec 18, 2025
b297aec
timestamps timestamps timestamps
leshy Dec 18, 2025
29cb094
checkpoint
leshy Dec 18, 2025
c0fc215
revert unitree_go2
paul-nechifor Dec 18, 2025
c1d7324
remove prints
paul-nechifor Dec 18, 2025
596e38d
Merge pull request #617 from dimensionalOS/unitree-agents2-skill-inte…
paul-nechifor Dec 18, 2025
8ad40a2
enable with ROBOT_IP set
alexlin2 Dec 18, 2025
678af5e
added new message types to __init__.py
alexlin2 Dec 18, 2025
194c8fe
vectorized pointcloud message conversion and remove require IP
alexlin2 Dec 19, 2025
6576ed6
ultimate fix for python stupid GIL
alexlin2 Dec 19, 2025
38815dd
odom and lidar/image timestamps are mismatched in go2 client
leshy Dec 19, 2025
62a68ab
Merge pull request #613 from dimensionalOS/gstreamer_absolute
paul-nechifor Dec 19, 2025
8b87a27
re did tests for ros_bridge
alexlin2 Dec 19, 2025
8629db2
working detection3d
leshy Dec 19, 2025
301c42a
zed local node (#623)
leshy Dec 19, 2025
0c7da02
Merge branch 'dev' into spatial-object-localization
leshy Dec 19, 2025
04d41b4
mock agent test fix
leshy Dec 19, 2025
6481186
Fix ROS tests for CI
spomichter Dec 19, 2025
b58b771
Wrap ROS types in try except - TODO: remove ros types
spomichter Dec 19, 2025
a3e0df9
rclpy CI import error
spomichter Dec 19, 2025
2122cca
Fixed broken camera info test
spomichter Dec 19, 2025
ecc2971
detector tests, stream tests fix
leshy Dec 19, 2025
b6a1139
type checks passing
leshy Dec 19, 2025
2979dde
module detection tests
leshy Dec 19, 2025
40b8dda
removing unused files
leshy Dec 19, 2025
2c946de
comment cleanup
leshy Dec 19, 2025
aba594f
Revert unneeded ros pytest marks and skips
spomichter Dec 19, 2025
68f553a
Merge pull request #610 - WIP bidirectional ROS Bridge for Unitree G1…
spomichter Dec 19, 2025
e6f1061
Fully working B1 ROS navigation on onboard cpu
spomichter Dec 18, 2025
d538c55
CI code cleanup
alexlin2 Dec 18, 2025
d6c7e0d
Added better watchdog and uni tests for b1 connection
spomichter Dec 19, 2025
bd8840b
Fix stand mode joystick control
spomichter Dec 19, 2025
0968aaf
Cleanup
spomichter Dec 19, 2025
d2c7b11
Added try catches to unitree b1 ros imports
spomichter Dec 19, 2025
dc87cab
Added thread locks and RobotMode type for b1
spomichter Dec 19, 2025
fb4b19f
Merge pull request #626 - Unitree B1 ROS<-->Dimensional Navigation
spomichter Dec 19, 2025
8d15809
Added build directory to gitignore
yashas-salankimatt Dec 19, 2025
21ca3c7
Merge pull request #628 from dimensionalOS/gitignore_build_fix
spomichter Dec 19, 2025
6363f08
pr review issues
leshy Dec 19, 2025
7ad2451
Merge pull request #583 - 2D/3D detection module + Pointcloud localiz…
spomichter Dec 19, 2025
b01baef
Camera calibration loading (#629)
leshy Dec 19, 2025
0704d2b
port navigation skills to agents2
paul-nechifor Dec 19, 2025
80cd3c9
add open street maps skill
paul-nechifor Dec 19, 2025
e5ef3be
add gps location to foxglove
paul-nechifor Dec 20, 2025
c51869f
add google maps skills
paul-nechifor Dec 20, 2025
36181a7
travel-points
paul-nechifor Dec 20, 2025
3145ce1
my files
paul-nechifor Dec 20, 2025
add9755
revert unitree go2 gps changes
paul-nechifor Dec 20, 2025
289c0d7
fix api key
paul-nechifor Dec 20, 2025
606e400
Merge pull request #630 from dimensionalOS/agent2-nav-skills
paul-nechifor Dec 20, 2025
1042937
fix all thread leaks
paul-nechifor Dec 21, 2025
bf0b038
fail tests which leak
paul-nechifor Dec 21, 2025
de80f26
ignore lcm, heavy, and ros
paul-nechifor Dec 21, 2025
0fc88e3
shared mem again
paul-nechifor Dec 21, 2025
28de4d1
clean up
paul-nechifor Dec 21, 2025
3e46d8e
move constants
paul-nechifor Dec 21, 2025
5c8a80b
add utilization
paul-nechifor Dec 15, 2025
3cb7b1b
prettier box
paul-nechifor Dec 21, 2025
7101fde
add monitoring back
paul-nechifor Dec 21, 2025
deae0b9
Merge pull request #650 - Shared Memory IPC integrated to Unitree Go2…
spomichter Dec 21, 2025
8febb3d
Merge branch 'dev' into fix-leaks
paul-nechifor Dec 21, 2025
270ff1d
review comment
paul-nechifor Dec 21, 2025
1cf6e68
Merge pull request #649 from dimensionalOS/fix-leaks
paul-nechifor Dec 21, 2025
3e8ecc7
fix leak
paul-nechifor Dec 21, 2025
ea68561
Merge pull request #652 from dimensionalOS/fix-leak
paul-nechifor Dec 21, 2025
ec1be66
suppress echos with counter
paul-nechifor Dec 22, 2025
1bf36d2
use uuid4
paul-nechifor Dec 22, 2025
e5d40f6
Merge pull request #653 from dimensionalOS/suppress-echos-with-counter
spomichter Dec 22, 2025
3da7a2d
Removing websocket vis causing crazy lag
spomichter Dec 22, 2025
a70bc27
Merge pull request #656 from dimensionalOS/remove-websocket-vis
spomichter Dec 22, 2025
77830a3
Fixed navigate to object reference in navigation.py to use module not…
spomichter Dec 22, 2025
1d5b0c6
Removed non-module navigate to object impl, created new Bbox navigati…
spomichter Dec 22, 2025
1cce977
Added dotenv to envrc
spomichter Dec 22, 2025
2777411
Merge pull request #655 from dimensionalOS/suppress-with-uuid
paul-nechifor Dec 22, 2025
75b2d2d
Fix detection2d bug in decoding of message when subscribed
spomichter Dec 22, 2025
8e41626
Fully working minimal 2d object tracker
spomichter Dec 22, 2025
6c23155
WIP: tracking stream still not working in foxglove. Changed tracked o…
spomichter Dec 22, 2025
356086e
Fully removed depth module from unitree go2
spomichter Dec 22, 2025
7fe80dd
Added stuck detection for 2d object tracker, fix frame copy bug over …
spomichter Dec 22, 2025
85672f6
Added back multi step navigatewithtext
spomichter Dec 22, 2025
9212487
Implementing feedback / changes to Image and CudaImage
mdaiter Dec 22, 2025
7d731e3
Add helpful comment for YUV conversion
mdaiter Dec 22, 2025
d69b8c4
CI code cleanup
mdaiter Dec 22, 2025
151f445
Merged dev
mdaiter Dec 22, 2025
bf2fa32
update tests to use actual image
mdaiter Dec 22, 2025
30cfdbd
Fix navigation tests
spomichter Dec 22, 2025
59b8e3e
Merge pull request #654 - Navigate to Object and object trackers re-i…
spomichter Dec 22, 2025
cf24ba5
Ros bridge test fix
alexlin2 Dec 22, 2025
96f62d6
video g1 spatial mem + detection - tomerge (#651)
leshy Dec 22, 2025
0c309e2
Update README.md
spomichter Dec 22, 2025
acf25c7
Merge pull request #664 from dimensionalOS/update-readme-temp
spomichter Dec 22, 2025
aa8e0a0
Update and speed up CUDA PnP
mdaiter Dec 22, 2025
572cd91
CI code cleanup
mdaiter Dec 22, 2025
3cb9c68
Adding averages to tests
mdaiter Dec 22, 2025
e5633cc
CI code cleanup
mdaiter Dec 22, 2025
c18f97b
merge dev
mdaiter Dec 22, 2025
00fe1f0
CI code cleanup
mdaiter Dec 22, 2025
9bec066
Push unitree_go2 to the latest
mdaiter Dec 22, 2025
29337f5
CI code cleanup
mdaiter Dec 22, 2025
ddad371
Merge pull request #612 from dimensionalOS/matt-image-upgrades
mdaiter Dec 22, 2025
fab1422
Revert "Image upgrades! Impls for CUDA + numpy, along with an abstrac…
leshy Dec 22, 2025
afd4e87
Merge pull request #665 from dimensionalOS/revert-612-matt-image-upgr…
spomichter Dec 22, 2025
ab38a46
Reapply "Image upgrades! Impls for CUDA + numpy, along with an abstra…
paul-nechifor Dec 22, 2025
1045cf3
fix
paul-nechifor Dec 22, 2025
bd410c5
CI code cleanup
paul-nechifor Dec 22, 2025
6c75af6
add crop back
paul-nechifor Dec 22, 2025
83c0cda
fix encoding
paul-nechifor Dec 22, 2025
3ae9f35
Fix detection 3d test for floating point non determinism
spomichter Dec 23, 2025
bec338b
Fix CI lack of timer precision for test reactive
spomichter Dec 23, 2025
cb31cab
Detection second pass (#662)
leshy Dec 23, 2025
f092014
Added cleaner Dask exit handling for cuda and shared memory object cl…
spomichter Dec 23, 2025
e69b50a
Fix lcm_encode in new Image and added BGR default
spomichter Dec 23, 2025
c11708f
Moved cudaimage unit tests to correct location
spomichter Dec 23, 2025
03a404c
Fix very broken to_cpu method in Image
spomichter Dec 23, 2025
a3743cb
Major rewrite of image backend tests, seperated cuda/cpu for testing …
spomichter Dec 23, 2025
5634dd5
Minor changes
spomichter Dec 23, 2025
5d94d6c
Fixes
spomichter Dec 23, 2025
bd181d0
Simplify to_cpu Image operation
spomichter Dec 23, 2025
2e3d572
Merge branch 'temp-dev' into fix-iage
spomichter Dec 23, 2025
87ac4a7
CI code cleanup
spomichter Dec 23, 2025
17d8f4b
Merge pull request #671 from dimensionalOS/fix-iage
spomichter Dec 23, 2025
429b30b
alibaba env var fix
leshy Dec 23, 2025
f3d3b14
retry decorator, better vl model query system, json query, bounding b…
leshy Dec 23, 2025
1f61d27
timestamped flakey test fix
leshy Dec 23, 2025
4d065d7
circular import bugfix
leshy Dec 23, 2025
3d42d1f
Fix Image __eq__
spomichter Dec 23, 2025
e80b936
squash
paul-nechifor Dec 23, 2025
650ed3d
001
paul-nechifor Dec 23, 2025
3f39716
002
paul-nechifor Dec 23, 2025
13a1ca6
better universal json and detection parsing for vlms
leshy Dec 23, 2025
ffaadb6
Merge pull request #675 from dimensionalOS/just-resources
paul-nechifor Dec 23, 2025
a3d1481
forgotten context managers
paul-nechifor Dec 23, 2025
73c76fa
Removed tests added in merge by accident
spomichter Dec 23, 2025
09435ae
renamed detections2d to detections
leshy Dec 23, 2025
57d4fda
Merge pull request #676 from dimensionalOS/forgotten-context-managers
paul-nechifor Dec 23, 2025
238b1eb
Merge branch 'dev' into temp-dev
spomichter Dec 23, 2025
c1075a9
CI code cleanup
spomichter Dec 23, 2025
faffaa0
obsoleted inconvinient detection format entirely
leshy Dec 23, 2025
180b18d
tests cleanup
leshy Dec 23, 2025
d480f99
detector grid testing
leshy Dec 23, 2025
196a6e6
yolo person detector cuda
leshy Dec 23, 2025
eab12ec
vlm sketch
leshy Dec 23, 2025
ac4c096
completely removed dep on old detection format
leshy Dec 23, 2025
a8a7b81
tests fix, module config fix
leshy Dec 23, 2025
c10a1d7
Fix race condition in CI for dask daemon threads
spomichter Dec 23, 2025
289699e
detection3d split into bbox and pc
leshy Dec 23, 2025
bae53fe
big detection restructure
leshy Dec 23, 2025
66eae21
restructure, mypy
leshy Dec 23, 2025
7532177
base.py for types, extracted table rendering to utils
leshy Dec 23, 2025
098456a
conftest typing
leshy Dec 23, 2025
c560e2e
fix module tests
paul-nechifor Dec 23, 2025
0c5b801
all mypy resolved
leshy Dec 23, 2025
925311a
Re fix floating point flaky test
spomichter Dec 23, 2025
f9eb398
Fix nvimgcodec tests from reloading Image and failing pytests when ru…
spomichter Dec 23, 2025
27acffa
Fix potential timestamp issue if set to 0.0
spomichter Dec 23, 2025
b73ca32
Added back agent image message to agent encode
spomichter Dec 23, 2025
3b7712e
Added Timestamped back to new Image
spomichter Dec 23, 2025
aab7931
Fixed sharpness implemented incorrectly as a method rather than prope…
spomichter Dec 23, 2025
370308a
Add co-author attribution
spomichter Dec 23, 2025
1ec6c92
Fix flaky wavefront test
spomichter Dec 23, 2025
db653e9
Test 0.1 thread delay for dask
spomichter Dec 23, 2025
d11c3c6
session level fixtures
leshy Dec 23, 2025
a944d3b
moondream integrated, generic huggingface model integration
leshy Dec 23, 2025
0d11a60
slightly nicer bounding boxes, slightly better vlm tests
leshy Dec 23, 2025
037a7f7
intelligent annotation font size, model warmup function
leshy Dec 23, 2025
2206170
messing with detections
leshy Dec 23, 2025
326dea8
color brightness for from_string
leshy Dec 23, 2025
c0793ac
Merge pull request #680 - CUDAImage, NumpyImage, Image refactor / imp…
spomichter Dec 23, 2025
757da37
Added dotenv back to removed .envrc. Needed to load .env
spomichter Dec 23, 2025
0bdff70
Merge pull request #673 - Fix .envrc and flaky test
spomichter Dec 23, 2025
a586b1a
Rename FakeRTC --> ReplayRTC
spomichter Dec 23, 2025
7a55c88
fix websocket vis performance
paul-nechifor Dec 22, 2025
74a4ca8
fix
paul-nechifor Dec 22, 2025
e54d4aa
Merge pull request #681 from dimensionalOS/rename-fake-to-replay
spomichter Dec 23, 2025
28305a3
mobileclip for reid, transforms for detections
leshy Dec 23, 2025
d918283
detection reconstruction in another module
leshy Dec 23, 2025
001533d
reid module, mobileclip
leshy Dec 23, 2025
c67cb41
code review change
paul-nechifor Dec 23, 2025
49bf5c9
Merge pull request #682 from dimensionalOS/fix-websocketvis-performan…
paul-nechifor Dec 23, 2025
000c657
quick person tracker
leshy Dec 23, 2025
0ac2210
person tracker cleanup
leshy Dec 23, 2025
22143d9
clip/mobileclip standardized implementation
leshy Dec 24, 2025
0eba928
reid experiment
leshy Dec 24, 2025
33eafde
reid simplification
leshy Dec 24, 2025
fee1fd1
disabling single test for now
leshy Dec 24, 2025
2b7e92b
removing garbage files
leshy Dec 24, 2025
dcbafc9
correct test naming
leshy Dec 24, 2025
ffc3c46
renamde type.py -> base.py for embedding models
leshy Dec 24, 2025
7b77e69
Merge branch 'dev' into detection-qwen-skills
leshy Dec 24, 2025
1b86fbe
openclip optional, passing tests
leshy Dec 24, 2025
00d79b5
image backend test skip
leshy Dec 24, 2025
4595409
removing .claude
leshy Dec 24, 2025
9537c60
tests fix
leshy Dec 24, 2025
5282339
mobile clip optional
leshy Dec 24, 2025
beec77e
work starting on actual qwen
leshy Dec 24, 2025
22faf1b
unitree qwen
leshy Dec 24, 2025
d26a793
g1 demo tweaks
leshy Dec 24, 2025
7286064
g1 video tweaks
leshy Dec 24, 2025
e4a6d18
spatial memory fix
leshy Dec 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
32 changes: 32 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "dimos-dev",
"image": "ghcr.io/dimensionalos/dev:dev",
"customizations": {
"vscode": {
"extensions": [
"charliermarsh.ruff",
"ms-python.vscode-pylance"
]
}
},
"containerEnv": {
"PYTHONPATH": "${localEnv:PYTHONPATH}:/workspaces/dimos"
},
"postCreateCommand": "git config --global --add safe.directory /workspaces/dimos && cd /workspaces/dimos && pre-commit install",
"settings": {
"notebook.formatOnSave.enabled": true,
"notebook.codeActionsOnSave": {
"notebook.source.fixAll": "explicit",
"notebook.source.organizeImports": "explicit"
},
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "explicit"
},
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.formatOnSave": true
},
"runArgs": [
"--cap-add=NET_ADMIN"
]
}
109 changes: 109 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
# Version control
.git
.gitignore
.github/

# Editor and IDE files
.vscode
.idea
*.swp
*.swo
.cursor/
.cursorignore

# Shell history
.bash_history
.zsh_history
.history

# Python virtual environments
**/venv/
**/.venv/
**/env/
**/.env/
**/*-venv/
**/*_venv/
**/ENV/


# Python build artifacts
__pycache__/
*.pyc
*.pyo
*.pyd
.Python
*.egg-info/
dist/
build/
*.so
*.dylib

# Environment file
.env
.env.local
.env.*.local

# Large data files
data/*
!data/.lfs/

# Model files (can be downloaded at runtime)
*.pt
*.pth
*.onnx
*.pb
*.h5
*.ckpt
*.safetensors
checkpoints/
assets/model-cache

# Logs
*.log

# Large media files (not needed for functionality)
*.png
*.jpg
*.jpeg
*.gif
*.mp4
*.mov
*.avi
*.mkv
*.webm
*.MOV

# Large font files
*.ttf
*.otf

# Node modules (for dev tools, not needed in container)
node_modules/
package-lock.json
package.json
bin/node_modules/

# Database files
*.db
*.sqlite
*.sqlite3

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Temporary files
tmp/
temp/
*.tmp
.python-version

# Exclude all assets subdirectories
assets/*/*
!assets/agent/prompt.txt
!assets/*
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
fi
use flake .
dotenv
5 changes: 5 additions & 0 deletions .envrc.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
fi
use flake .
dotenv_if_exists
2 changes: 2 additions & 0 deletions .envrc.venv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source env/bin/activate
dotenv_if_exists
17 changes: 15 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
* text=auto
# Handle line endings automatically for files Git considers text,
# converting them to LF on checkout.
* text=auto eol=lf
# Ensure Python files always use LF for line endings.
*.py text eol=lf

# Treat designated file types as binary and do not alter their contents or line endings.
*.png binary
*.jpg binary
*.ico binary
*.pdf binary
# Explicit LFS tracking for test files
/data/.lfs/*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text binary
*.mp4 filter=lfs diff=lfs merge=lfs -text binary
*.mov filter=lfs diff=lfs merge=lfs -text binary
*.gif filter=lfs diff=lfs merge=lfs -text binary
59 changes: 59 additions & 0 deletions .github/actions/docker-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: docker-build
description: "Composite action to build and push a Docker target to GHCR"
inputs:
target:
description: "Dockerfile target stage to build"
required: true
tag:
description: "Image tag to push"
required: true
freespace:
description: "Remove large pre‑installed SDKs before building to free space"
required: false
default: "false"
context:
description: "Docker build context"
required: false
default: "."

runs:
using: "composite"
steps:
- name: Free up disk space
if: ${{ inputs.freespace == 'true' }}
shell: bash
run: |
echo -e "pre cleanup space:\n $(df -h)"
sudo rm -rf /opt/ghc
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/lib/android
echo -e "post cleanup space:\n $(df -h)"

- uses: actions/checkout@v4

- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- uses: crazy-max/ghaction-github-runtime@v3

- uses: docker/setup-buildx-action@v3
with:
driver: docker-container
install: true
use: true

- name: Build & Push ${{ inputs.target }}
uses: docker/build-push-action@v6
with:
push: true
context: ${{ inputs.context }}
file: docker/${{ inputs.target }}/Dockerfile
tags: ghcr.io/dimensionalos/${{ inputs.target }}:${{ inputs.tag }}
cache-from: type=gha,scope=${{ inputs.target }}
cache-to: type=gha,mode=max,scope=${{ inputs.target }}
build-args: |
FROM_TAG=${{ inputs.tag }}
149 changes: 149 additions & 0 deletions .github/workflows/_docker-build-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
name: docker-build-template
on:
workflow_call:
inputs:
from-image: { type: string, required: true }
to-image: { type: string, required: true }
dockerfile: { type: string, required: true }
freespace: { type: boolean, default: true }
should-run: { type: boolean, default: false }
context: { type: string, default: '.' }

# you can run this locally as well via
# ./bin/dockerbuild [image-name]
jobs:
build:
runs-on: [self-hosted, Linux]
permissions:
contents: read
packages: write

steps:
- name: Fix permissions
if: ${{ inputs.should-run }}
run: |
sudo chown -R $USER:$USER ${{ github.workspace }} || true

- uses: actions/checkout@v4
if: ${{ inputs.should-run }}
with:
fetch-depth: 0

- name: free up disk space
# explicitly enable this for large builds
if: ${{ inputs.should-run && inputs.freespace }}
run: |
echo -e "pre cleanup space:\n $(df -h)"
sudo rm -rf /opt/ghc
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/boost
sudo rm -rf /usr/local/lib/android

echo "=== Cleaning images from deleted branches ==="

# Get list of all remote branches
git ls-remote --heads origin | awk '{print $2}' | sed 's|refs/heads/||' > /tmp/active_branches.txt

# Check each docker image tag against branch list
docker images --format "{{.Repository}}:{{.Tag}}|{{.ID}}" | \
grep "ghcr.io/dimensionalos" | \
grep -v ":<none>" | \
while IFS='|' read image_ref id; do
tag=$(echo "$image_ref" | cut -d: -f2)

# Skip if tag matches an active branch
if grep -qx "$tag" /tmp/active_branches.txt; then
echo "Branch exists: $tag - keeping $image_ref"
else
echo "Branch deleted: $tag - removing $image_ref"
docker rmi "$id" 2>/dev/null || true
fi
done

rm -f /tmp/active_branches.txt

USAGE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//')
echo "Pre-docker-cleanup disk usage: ${USAGE}%"

if [ $USAGE -gt 60 ]; then
echo "=== Running quick cleanup (usage > 60%) ==="

# Keep newest image per tag
docker images --format "{{.Repository}}|{{.Tag}}|{{.ID}}" | \
grep "ghcr.io/dimensionalos" | \
grep -v "<none>" | \
while IFS='|' read repo tag id; do
created_ts=$(docker inspect -f '{{.Created}}' "$id" 2>/dev/null)
created_unix=$(date -d "$created_ts" +%s 2>/dev/null || echo "0")
echo "${repo}|${tag}|${id}|${created_unix}"
done | sort -t'|' -k1,1 -k2,2 -k4,4nr | \
awk -F'|' '
{
repo=$1; tag=$2; id=$3
repo_tag = repo ":" tag

# Skip protected tags
if (tag ~ /^(main|dev|latest)$/) next

# Keep newest per tag, remove older duplicates
if (!(repo_tag in seen_combos)) {
seen_combos[repo_tag] = 1
} else {
system("docker rmi " id " 2>/dev/null || true")
}
}'

docker image prune -f
docker volume prune -f
fi

# Aggressive cleanup if still above 85%
USAGE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//')
if [ $USAGE -gt 85 ]; then
echo "=== AGGRESSIVE cleanup (usage > 85%) - removing all except main/dev ==="

# Remove ALL images except main and dev tags
docker images --format "{{.Repository}}:{{.Tag}} {{.ID}}" | \
grep -E "ghcr.io/dimensionalos" | \
grep -vE ":(main|dev)$" | \
awk '{print $2}' | xargs -r docker rmi -f || true

docker container prune -f
docker volume prune -a -f
docker network prune -f
docker image prune -f
fi

echo -e "post cleanup space:\n $(df -h)"

- uses: docker/login-action@v3
if: ${{ inputs.should-run }}
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# required for github cache of docker layers
- uses: crazy-max/ghaction-github-runtime@v3
if: ${{ inputs.should-run }}

# required for github cache of docker layers
- uses: docker/setup-buildx-action@v3
if: ${{ inputs.should-run }}
with:
driver: docker-container
install: true
use: true

- uses: docker/build-push-action@v6
if: ${{ inputs.should-run }}
with:
push: true
context: ${{ inputs.context }}
file: docker/${{ inputs.dockerfile }}/Dockerfile
tags: ${{ inputs.to-image }}
cache-from: type=gha,scope=${{ inputs.dockerfile }}
cache-to: type=gha,mode=max,scope=${{ inputs.dockerfile }}
#cache-from: type=gha,scope=${{ inputs.dockerfile }}-${{ inputs.from-image }}
#cache-to: type=gha,mode=max,scope=${{ inputs.dockerfile }}-${{ inputs.from-image }}
build-args: FROM_IMAGE=${{ inputs.from-image }}
Loading