Skip to content

Commit 627f3dd

Browse files
leshypaul-nechifor
andauthored
Granular deps (#894)
* splitting deps checkpoint * further splitting, removed zmq * pip install granular * uv lock update, addressed pr comments * version pin for unitree-leshy * restore deleted code * fix duplicates * move numba into dependencies * move openai --------- Co-authored-by: Paul Nechifor <paul@nechifor.net> Former-commit-id: 2dc2a76 [formerly d1c87cd] Former-commit-id: b292c46
1 parent 5109551 commit 627f3dd

File tree

4 files changed

+95
-107
lines changed

4 files changed

+95
-107
lines changed

dimos/stream/video_operators.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import cv2
2222
import numpy as np
2323
from reactivex import Observable, Observer, create, operators as ops
24-
import zmq
2524

2625
if TYPE_CHECKING:
2726
from dimos.stream.frame_processor import FrameProcessor
@@ -215,27 +214,6 @@ def with_optical_flow(
215214
ops.map(frame_processor.visualize_flow),
216215
)
217216

218-
@staticmethod
219-
def with_zmq_socket(
220-
socket: zmq.Socket, # type: ignore[type-arg]
221-
scheduler: Any | None = None,
222-
) -> Callable[[Observable], Observable]: # type: ignore[type-arg]
223-
def send_frame(frame, socket) -> None: # type: ignore[no-untyped-def]
224-
_, img_encoded = cv2.imencode(".jpg", frame)
225-
socket.send(img_encoded.tobytes())
226-
# print(f"Frame received: {frame.shape}")
227-
228-
# Use a default scheduler if none is provided
229-
if scheduler is None:
230-
from reactivex.scheduler import ThreadPoolScheduler
231-
232-
scheduler = ThreadPoolScheduler(1) # Single-threaded pool for isolation
233-
234-
return lambda source: source.pipe(
235-
ops.observe_on(scheduler), # Ensure this part runs on its own thread
236-
ops.do_action(lambda frame: send_frame(frame, socket)),
237-
)
238-
239217
@staticmethod
240218
def encode_image() -> Callable[[Observable], Observable]: # type: ignore[type-arg]
241219
"""

docker/python/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ COPY . /app/
4949

5050
# Install dependencies with UV (10-100x faster than pip)
5151
RUN uv pip install --upgrade 'pip>=24' 'setuptools>=70' 'wheel' 'packaging>=24' && \
52-
uv pip install '.[cpu,sim,drone]'
52+
uv pip install '.[misc,cpu,sim,drone,unitree,web,perception,visualization]'

pyproject.toml

Lines changed: 93 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -29,88 +29,75 @@ requires-python = ">=3.10"
2929
readme = "README.md"
3030

3131
dependencies = [
32-
# Core requirements
33-
"opencv-python",
34-
"numba>=0.60.0", # Python 3.12 support
35-
"llvmlite>=0.42.0", # Required by numba 0.60+
36-
"python-dotenv",
37-
"openai",
38-
"anthropic>=0.19.0",
39-
"cerebras-cloud-sdk",
40-
"moondream",
32+
# Transport Protocols
33+
"dimos-lcm",
34+
"PyTurboJPEG==1.8.2",
35+
36+
# Core
4137
"numpy>=1.26.4",
42-
"rerun-sdk>=0.20.0",
38+
"scipy>=1.15.1",
39+
"reactivex",
40+
"asyncio==3.4.3",
41+
"sortedcontainers==2.4.0",
42+
"pydantic",
43+
"python-dotenv",
44+
45+
# Multiprocess
46+
"dask[complete]==2025.5.1",
47+
"plum-dispatch==2.5.7",
48+
49+
# Logging
50+
"structlog>=25.5.0,<26",
4351
"colorlog==6.9.0",
52+
53+
# Core Msgs
54+
"opencv-python",
55+
"open3d",
56+
57+
# CLI
58+
"pydantic-settings>=2.11.0,<3",
59+
"textual==3.7.1",
60+
"terminaltexteffects==0.12.2",
61+
"typer>=0.19.2,<1",
62+
"plotext==5.3.2",
63+
64+
# Used for calculating the occupancy map.
65+
"numba>=0.60.0", # First version supporting Python 3.12
66+
"llvmlite>=0.42.0", # Required by numba 0.60+
67+
]
68+
69+
70+
[project.scripts]
71+
lcmspy = "dimos.utils.cli.lcmspy.run_lcmspy:main"
72+
foxglove-bridge = "dimos.utils.cli.foxglove_bridge.run_foxglove_bridge:main"
73+
skillspy = "dimos.utils.cli.skillspy.skillspy:main"
74+
agentspy = "dimos.utils.cli.agentspy.agentspy:main"
75+
humancli = "dimos.utils.cli.human.humanclianim:main"
76+
dimos = "dimos.robot.cli.dimos:main"
77+
78+
[project.optional-dependencies]
79+
misc = [
80+
# Core requirements
81+
"cerebras-cloud-sdk",
4482
"yapf==0.40.2",
4583
"typeguard",
4684
"empy==3.3.4",
4785
"catkin_pkg",
4886
"lark",
49-
"plum-dispatch==2.5.7",
50-
"ffmpeg-python",
5187
"tiktoken>=0.8.0",
52-
"Flask>=2.2",
5388
"python-multipart==0.0.20",
54-
"reactivex",
55-
"asyncio==3.4.3",
56-
"unitree-webrtc-connect-leshy>=2.0.7",
5789
"tensorzero==2025.7.5",
58-
"structlog>=25.5.0,<26",
59-
60-
# Web Extensions
61-
"fastapi>=0.115.6",
62-
"sse-starlette>=2.2.1",
63-
"uvicorn>=0.34.0",
64-
65-
# MCP Server
66-
"mcp>=1.0.0",
67-
68-
# Agents
69-
"langchain>=1,<2",
70-
"langchain-chroma>=1,<2",
71-
"langchain-core>=1,<2",
72-
"langchain-openai>=1,<2",
73-
"langchain-text-splitters>=1,<2",
74-
"langchain-huggingface>=1,<2",
75-
"langchain-ollama>=1,<2",
76-
"bitsandbytes>=0.48.2,<1.0; sys_platform == 'linux'",
77-
"ollama>=0.6.0",
78-
79-
# Class Extraction
80-
"pydantic",
8190

8291
# Developer Specific
8392
"ipykernel",
8493

85-
# Unitree webrtc streaming
86-
"pycryptodome",
87-
"sounddevice",
88-
"pyaudio",
89-
"requests",
90-
"wasmtime",
91-
92-
# Image
93-
"PyTurboJPEG==1.8.2",
94-
95-
# Audio
96-
"openai-whisper",
97-
"soundfile",
98-
99-
# Hugging Face
100-
"transformers[torch]==4.49.0",
101-
10294
# Vector Embedding
10395
"sentence_transformers",
10496

10597
# Perception Dependencies
106-
"ultralytics>=8.3.70",
107-
"filterpy>=1.4.5",
108-
"scipy>=1.15.1",
10998
"scikit-learn",
110-
"Pillow",
11199
"clip",
112100
"timm>=1.0.15",
113-
"lap>=0.5.12",
114101
"opencv-contrib-python==4.10.0.84",
115102

116103
# embedding models
@@ -120,41 +107,65 @@ dependencies = [
120107
"tensorboard==2.20.0",
121108

122109
# Mapping
123-
"open3d",
124110
"googlemaps>=4.10.0",
125111

126112
# Inference
127113
"onnx",
128114
"einops==0.8.1",
129-
# Multiprocess
130-
"dask[complete]==2025.5.1",
131-
132-
# LCM / DimOS utilities
133-
"dimos-lcm==0.1.0",
134-
135-
# CLI
136-
"pydantic-settings>=2.11.0,<3",
137-
"typer>=0.19.2,<1",
138-
"plotext==5.3.2",
139115

140116
# Teleop
141117
"pygame>=2.6.1",
142118
# Hardware SDKs
143119
"xarm-python-sdk>=1.17.0",
120+
]
144121

145-
"numba>=0.60.0", # First version supporting Python 3.12
146-
"llvmlite>=0.42.0", # Required by numba 0.59+
122+
visualization = [
123+
"rerun-sdk>=0.20.0",
147124
]
148125

149-
[project.scripts]
150-
lcmspy = "dimos.utils.cli.lcmspy.run_lcmspy:main"
151-
foxglove-bridge = "dimos.utils.cli.foxglove_bridge.run_foxglove_bridge:main"
152-
skillspy = "dimos.utils.cli.skillspy.skillspy:main"
153-
agentspy = "dimos.utils.cli.agentspy.agentspy:main"
154-
humancli = "dimos.utils.cli.human.humanclianim:main"
155-
dimos = "dimos.robot.cli.dimos:main"
126+
agents = [
127+
"langchain>=1,<2",
128+
"langchain-chroma>=1,<2",
129+
"langchain-core>=1,<2",
130+
"langchain-openai>=1,<2",
131+
"langchain-text-splitters>=1,<2",
132+
"langchain-huggingface>=1,<2",
133+
"langchain-ollama>=1,<2",
134+
"bitsandbytes>=0.48.2,<1.0; sys_platform == 'linux'",
135+
"ollama>=0.6.0",
136+
"anthropic>=0.19.0",
137+
138+
# Audio
139+
"openai",
140+
"openai-whisper",
141+
"sounddevice",
142+
143+
# MCP Server
144+
"mcp>=1.0.0",
145+
]
146+
147+
web = [
148+
"fastapi>=0.115.6",
149+
"sse-starlette>=2.2.1",
150+
"uvicorn>=0.34.0",
151+
"ffmpeg-python",
152+
"soundfile",
153+
]
154+
155+
perception = [
156+
"ultralytics>=8.3.70",
157+
"filterpy>=1.4.5",
158+
"Pillow",
159+
"lap>=0.5.12",
160+
"transformers[torch]==4.49.0",
161+
"moondream",
162+
]
163+
164+
unitree = [
165+
"dimos[agents,web,perception,visualization]",
166+
"unitree-webrtc-connect-leshy>=2.0.7"
167+
]
156168

157-
[project.optional-dependencies]
158169
manipulation = [
159170
# Contact Graspnet Dependencies
160171
"h5py>=3.7.0",
@@ -215,7 +226,6 @@ dev = [
215226
"pytest-env==1.1.5",
216227
"pytest-timeout==2.4.0",
217228
"coverage>=7.0", # Required for numba compatibility (coverage.types)
218-
"textual==3.7.1",
219229
"requests-mock==1.12.1",
220230
"terminaltexteffects==0.12.2",
221231
"watchdog>=3.0.0",

uv.lock.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)