-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpixi.toml
More file actions
448 lines (377 loc) · 12.4 KB
/
pixi.toml
File metadata and controls
448 lines (377 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# Copyright (c) 2026 Robotics and AI Institute LLC dba RAI Institute. All rights reserved.
[workspace]
name = "exploy"
version = "0.1.0"
description = "EXport and dePLOY Reinforcement Learning policies."
authors = ["TODO"]
channels = ["conda-forge"]
platforms = ["linux-64", "osx-arm64"]
# ================
# Feature: default
# ================
# Core dependencies (minimal base).
[dependencies]
git = "*"
[tasks.check]
description = "Check all code without making changes."
depends-on = [
{ task = "format-python-check", environment = "ci" },
{ task = "format-cpp-check", environment = "ci" },
]
[tasks.format]
description = "Format all code."
depends-on = [
{ task = "format-python", environment = "ci" },
{ task = "format-cpp", environment = "ci" },
]
[tasks.lint]
description = "Lint all code."
depends-on = [{ task = "lint-python", environment = "ci" }]
[tasks.build]
description = "Build all C++ code."
depends-on = [
{ task = "build-cpp", environment = "cpp" },
{ task = "build-cpp-example", environment = "cpp" },
]
[tasks.test]
description = "Run all tests."
depends-on = [
{ task = "test-python", environment = "python" },
{ task = "test-cpp", environment = "cpp" },
]
[tasks.clean]
description = "Clean all build artifacts and caches."
cmd = "rm -rf $PIXI_PROJECT_ROOT/build $PIXI_PROJECT_ROOT/.pixi"
# ============
# Environments
# ============
# Environments are defined as sets of features.
# Here below a quick overview of the main features and their intended use:
#
# - The 'default' feature is included in all environments, and can be used for shared dependencies.
# - The 'env-*' features are used to specify environment-specific dependencies and tasks.
# - The '*-dev' features are used to specify development dependencies and tasks that are not needed for runtime.
# - The 'exploy-*-runtime' features are used to specify runtime dependencies.
# -------------------
# Environment: python
# -------------------
# Python development (exploy.core).
[environments.python]
features = [
# Specific features.
"env-python",
# Common features.
"default",
"python-dev",
"exploy-python-runtime",
"editable-exploy-python",
]
solve-group = "exploy"
[feature.env-python.tasks]
test-python = "pytest"
test-python-core = "pytest -m core"
# This task checks whether the pyproject.toml is properly configured for uv.
[feature.env-python.tasks.run-uv-export]
cmd = "uv export --quiet --extra all --no-hashes --no-header --no-annotate"
# ----------------
# Environment: cpp
# ----------------
# C++ development (controller).
# Note: Python features are needed for the tests.
[environments.cpp]
features = [
# Specific features.
"env-cpp",
"exploy-cpp-runtime",
# Common features.
"default",
"cpp-dev",
"exploy-python-runtime",
]
solve-group = "exploy"
[feature.cpp-dev.dependencies]
cmake = ">=3.23"
compilers = "*"
gmock = "*"
gtest = "*"
ninja = "*"
[feature.cpp-dev.target.linux-64.dependencies]
extra-cmake-modules = "*"
[feature.env-cpp.tasks.configure-cpp]
cmd = """
cmake \
-S control \
-B build/control \
-G Ninja \
-DBUILD_TESTING:BOOL=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON
"""
[feature.env-cpp.tasks.build-cpp]
cmd = "cmake --build build/control"
depends-on = ["configure-cpp"]
[feature.env-cpp.tasks.test-cpp]
cmd = "ctest --test-dir build/control --output-on-failure"
# Controller example
[feature.env-cpp.tasks.configure-cpp-example]
cmd = """
cmake \
-S examples/controller \
-B build/examples/controller \
-G Ninja \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON
"""
[feature.env-cpp.tasks.build-cpp-example]
cmd = "cmake --build build/examples/controller"
depends-on = ["configure-cpp-example"]
[feature.env-cpp.tasks.run-cpp-example-isaaclab]
cmd = """
build/examples/controller/loopback_controller_example \
$PIXI_PROJECT_ROOT/examples/exporter_scripts/isaaclab/exporter_tests/test_export.onnx \
--cycles 100
"""
depends-on = [
{ task = "build-cpp-example", environment = "cpp" },
{ task = "export-isaaclab-ci", environment = "isaaclab" },
]
[feature.env-cpp.tasks.run-cpp-example-mjlab]
cmd = """
build/examples/controller/loopback_controller_example \
$PIXI_PROJECT_ROOT/examples/exporter_scripts/mjlab/exporter_tests/test_export.onnx \
--cycles 100
"""
depends-on = [
{ task = "build-cpp-example", environment = "cpp" },
{ task = "export-mjlab-ci", environment = "mjlab" },
]
[feature.env-cpp.tasks.run-cpp-example]
depends-on = ["run-cpp-example-isaaclab", "run-cpp-example-mjlab"]
# pre-commit run --show-diff-on-failure --all-files
# ---------------
# Environment: ci
# ---------------
[environments.ci]
features = [
# Specific features.
"env-ci",
# Common features.
"default",
"exploy-python-runtime",
"editable-exploy-python",
]
solve-group = "exploy"
[feature.env-ci.dependencies]
clang-format = "*"
nodejs = "*"
pre-commit = "*"
python = "*"
"ruamel.yaml" = "*"
ruff = "*"
[feature.env-ci.tasks]
lint-python = "ruff check ."
lint-python-fix = "ruff check --fix ."
format-python = "ruff format ."
format-python-check = "ruff format --check ."
pre-commit-ci = "pre-commit run --show-diff-on-failure --all-files"
format-cpp = "find control -name '*.cpp' -o -name '*.hpp' | xargs clang-format -i"
format-cpp-check = "find control -name '*.cpp' -o -name '*.hpp' | xargs clang-format --dry-run --Werror"
# -----------------
# Environment: docs
# -----------------
# Documentation building.
[environments.docs]
features = [
# Specific features.
"env-docs",
# Common features.
"default",
"exploy-python-runtime",
"editable-exploy-python",
]
solve-group = "exploy"
[feature.env-docs.dependencies]
breathe = "*"
doxygen = "*"
furo = "*"
myst-parser = "*"
python = "*"
sphinx = "*"
sphinx-autodoc-typehints = "*"
[feature.env-docs.tasks]
clean-docs = "rm -rf docs/_build"
doxygen = "mkdir -p docs/_build/doxygen && doxygen Doxyfile"
open-docs = "xdg-open docs/_build/html/index.html || open docs/_build/html/index.html"
[feature.env-docs.tasks.build-docs]
cmd = "sphinx-build -b html docs docs/_build/html"
depends-on = ["doxygen"]
[feature.env-docs.tasks.linkcheck]
cmd = "sphinx-build -b linkcheck docs docs/_build/linkcheck"
depends-on = ["doxygen"]
# -------------------
# Environment: mjlab
# -------------------
# Due to transitive git dependencies from MjLab (e.g. mujoco-warp), merging this environment
# into the main 'exploy' solve group causes dependency conflicts. For now, we keep it separate.
# Note: this environment is not using on purpose 'exploy-python-runtime' since delicate dependencies
# that are shared with MjLab are handled directly in the 'mjlab-*' feature.
[environments.mjlab]
features = [
# Specific features.
"env-mjlab",
"mjlab-120",
"editable-exploy-python-mjlab",
# Common features.
"python-dev",
]
no-default-feature = true
[feature.env-mjlab.tasks]
export-mjlab-g1 = "python examples/exporter_scripts/mjlab/export_mjlab.py --task Mjlab-Velocity-Flat-Unitree-G1 --pause-on-failure"
export-mjlab = { depends-on = ["export-mjlab-g1"] }
test-python-mjlab = "pytest python/exploy/exporter/frameworks/mjlab"
test-import-mjlab = "python -c \"import mjlab; print('MjLab installed:', mjlab.__file__)\""
verify-mjlab = { depends-on = ["test-import-mjlab"] }
test-mjlab = { depends-on = ["verify-mjlab", "test-python-mjlab"] }
[feature.env-mjlab.tasks.export-mjlab-ci]
cmd = "python examples/exporter_scripts/mjlab/export_mjlab.py --task Mjlab-Velocity-Flat-Unitree-G1"
inputs = [
"python/exploy/exporter/core/*",
"python/exploy/exporter/frameworks/mjlab/*",
"examples/exporter_scripts/mjlab/export_mjlab.py",
]
outputs = ["examples/exporter_scripts/mjlab/exporter_tests/test_export.onnx"]
# ---------------------
# Environment: isaaclab
# ---------------------
# Due to strict dependency pinnings of IsaacSim and IsaacLab, merging this environment into
# the main 'exploy' solve group causes dependency conflicts. For now, we keep it separate.
# Note: this environment is not using on purpose 'exploy-python-runtime' since delicate dependencies
# that are shared with Isaac* are handled directly in the 'isaaclab-*' feature.
[environments.isaaclab]
features = [
# Specific features.
"env-isaaclab",
"isaaclab-232",
"editable-exploy-python-isaaclab",
# Common features.
"python-dev",
]
no-default-feature = true
[feature.env-isaaclab.tasks]
# Tasks to export policies for Isaac Lab.
export-isaaclab-g1 = "python examples/exporter_scripts/isaaclab/export_isaaclab.py --task Isaac-Velocity-Rough-G1-Play-v0 --pause-on-failure"
export-isaaclab-g1-rnn = "python examples/exporter_scripts/isaaclab/export_isaaclab.py --task Exploy-Velocity-Flat-G1-RNN-Play-v0 --pause-on-failure"
export-isaaclab-anymal = "python examples/exporter_scripts/isaaclab/export_isaaclab.py --task Isaac-Velocity-Rough-Anymal-C-Play-v0 --pause-on-failure"
export-isaaclab = { depends-on = ["export-isaaclab-g1"] }
test-python-isaaclab = "pytest python/exploy/exporter/frameworks/isaaclab"
test-isaaclab = { depends-on = ["verify-isaaclab", "test-python-isaaclab"] }
test-import-isaaclab = "python -c \"import isaaclab; print('Isaac Lab installed:', isaaclab.__file__)\""
test-import-torch = "python -c \"import torch; print('CUDA available:', torch.cuda.is_available())\""
verify-isaaclab = { depends-on = ["test-import-isaaclab", "test-import-torch"] }
# Tasks to test Isaac Lab installation.
[feature.env-isaaclab.tasks.export-isaaclab-ci]
cmd = "python examples/exporter_scripts/isaaclab/export_isaaclab.py --task Isaac-Velocity-Rough-G1-Play-v0"
inputs = [
"python/exploy/exporter/core/*",
"python/exploy/exporter/frameworks/isaaclab/*",
"examples/exporter_scripts/isaaclab/export_isaaclab.py",
]
outputs = ["examples/exporter_scripts/isaaclab/exporter_tests/test_export.onnx"]
# ========
# Features
# ========
# Features are used to specify sets of dependencies and tasks that can be shared across environments.
# ---------------------------------------
# Features: exploy-* runtime dependencies
# ---------------------------------------
# Keep this in sync with CMake runtime requirements.
[feature.exploy-cpp-runtime.dependencies]
eigen = ">=3.4"
fmt = ">=9.1"
nlohmann_json = ">=3.11"
# This should be >=1.15 but we need 1.24.2 for OOTB CMake support in conda-forge.
onnxruntime-cpp = ">=1.24.2"
# Keep this in sync with pyproject.toml.
[feature.exploy-python-runtime.dependencies]
numpy = "<2"
onnx = "*"
onnxruntime = "*"
onnxscript = "*"
pytorch = "*"
# -----------------------------------------
# Features: editable-exploy-* installations
# -----------------------------------------
# Editable installation of: exploy.
[feature.editable-exploy-python.pypi-dependencies]
exploy = { path = ".", editable = true }
# Editable installation of: exploy[mjlab].
[feature.editable-exploy-python-mjlab.pypi-dependencies]
exploy = { path = ".", extras = ["mjlab"], editable = true }
# Editable installation of: exploy[isaaclab].
[feature.editable-exploy-python-isaaclab.pypi-dependencies]
exploy = { path = ".", extras = ["isaaclab"], editable = true }
# -------------------
# Feature: python-dev
# -------------------
[feature.python-dev.dependencies]
hatch = "*"
hatch-vcs = "*"
ipython = "*"
pip = "*"
pybind11 = ">=2.10"
pytest = "*"
python = "*"
python-build = "*"
uv = "*"
[feature.python-dev.pypi-dependencies]
pytest-gitignore = "*"
# ---------------
# Feature: mjlab
# ---------------
[feature.mjlab-120]
platforms = ["linux-64"]
[feature.mjlab-120.system-requirements]
libc = { family = "glibc", version = "2.35" }
[feature.mjlab-120.dependencies]
numpy = "<2"
python = "3.11.*"
pytorch = "*"
rich = ">=13.3.3"
mjlab = "==1.2.0"
scipy = "*"
# -----------------
# Feature: isaaclab
# -----------------
[feature.isaaclab-232]
platforms = ["linux-64"]
[feature.isaaclab-232.activation.env]
LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:$CONDA_PREFIX/lib"
OMNI_KIT_ACCEPT_EULA = "yes"
[feature.isaaclab-232.system-requirements]
cuda = "13"
libc = { family = "glibc", version = "2.35" }
[feature.isaaclab-232.pypi-options]
no-build-isolation = true
extra-index-urls = ["https://pypi.nvidia.com"]
[feature.isaaclab-232.dependencies]
click = "==8.1.7"
cryptography = "==44.0.0"
filelock = "==3.13.1"
fsspec = "==2024.6.1"
gymnasium = "==1.2.0"
idna = "==3.10"
numpy = "==1.26.0"
networkx = "==3.3"
markupsafe = "==2.1.3"
packaging = "==23.0"
pillow = "==11.3.0"
psutil = "==5.9.8"
pytorch = { version = "==2.7.0", build = "*cuda*" }
python = "3.11.*"
pyyaml = "==6.0.2"
rsl-rl-lib = "<4"
sympy = "==1.13.3"
torchvision = "==0.22.0"
typing-extensions = "==4.12.2"
# Headless rendering.
libglu = "*"
[feature.isaaclab-232.pypi-dependencies]
isaacsim = { extras = ["all"], version = "==5.1.0.0" }