-
Notifications
You must be signed in to change notification settings - Fork 62
Expand file tree
/
Copy pathpixi.toml
More file actions
759 lines (687 loc) · 37.3 KB
/
Copy pathpixi.toml
File metadata and controls
759 lines (687 loc) · 37.3 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
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
[workspace]
name = "momentum"
channels = ["conda-forge"]
platforms = [
"linux-64",
"linux-aarch64",
"osx-64",
"osx-arm64",
"win-64",
{ platform = "linux-64", cuda = "12" },
{ platform = "win-64", cuda = "12" },
]
version = "0.1.0"
description = "A library providing foundational algorithms for human kinematic motion and numerical optimization solvers to apply human motion in various applications"
license = "MIT"
readme = "README.md"
homepage = "https://facebookresearch.github.io/momentum/"
repository = "https://github.com/facebookresearch/momentum"
[dependencies]
# build and test dependencies
c-compiler = ">=1.11.0,<2"
clang-format = "==21.1.2"
cmake = ">=4.3.0,<5"
cxx-compiler = ">=1.11.0,<2"
gtest = ">=1.17.0,<2"
libboost-devel = ">=1.84.0,<2"
ninja = ">=1.13.1,<2"
pip = ">=25.2,<26"
pybind11 = ">=2.13.6,<4"
pytest = ">=8.4.2,<9"
scikit-build-core = ">=0.10.0,<0.11"
scipy = ">=1.10.0,<2"
setuptools = ">=80.9.0,<81"
setuptools-scm = ">=8.0.0,<9"
sphinx = ">=7.0.0,<9"
sphinx-rtd-theme = ">=3.0.2,<4"
jinja2 = ">=3.1.0,<4"
# runtime dependencies
blas = ">=2.135,<3"
ceres-solver = ">=2.2.0,<3"
cli11 = ">=2.5.0,<3"
dispenso = ">=1.4.0,<2"
eigen = ">=5.0.0,<5.1"
ezc3d = ">=1.5.19,<2"
drjit-cpp = ">=1.2.0,<2"
fmt = ">=11.2.0,<12"
fx-gltf = ">=2.0.0,<3"
indicators = ">=2.3,<3"
ms-gsl = ">=4.2.0,<5"
nlohmann_json = ">=3.12.0,<4"
openfbx = ">=0.9,<0.10"
openusd = ">=25.05,<26"
openssl = ">=3.5.4,<4"
pytorch = ">=2.8.0,<3"
re2 = ">=2025.8.12,<2026"
spdlog = ">=1.15.3,<2"
tracy-profiler-client = ">=0.12.2,<0.13"
urdfdom = ">=4.0.1,<5"
zlib = ">=1.3.1,<2"
[tasks]
clean = { cmd = """
rm -rf build \
&& rm -rf .pixi \
&& rm pixi.lock
""", description = "Clean all build artifacts and pixi cache" }
lint = { cmd = "clang-format -i axel/**/*.h axel/**/*.cpp momentum/**/*.h momentum/**/*.cpp pymomentum/**/*.h pymomentum/**/*.cpp", description = "Format C++ code using clang-format" }
lint-check = { cmd = "clang-format --dry-run --Werror axel/**/*.h axel/**/*.cpp momentum/**/*.h momentum/**/*.cpp pymomentum/**/*.h pymomentum/**/*.cpp", description = "Check if code is properly formatted without modifying files" }
config = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/release \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=ON \
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_PROFILING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_INSTALL_EXAMPLES=ON \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DMOMENTUM_USE_SYSTEM_TRACY=ON
""", env = { MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" }, description = "Configure CMake for Release build" }
config_dev = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/debug \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=ON \
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_PROFILING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_INSTALL_EXAMPLES=ON \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DMOMENTUM_USE_SYSTEM_TRACY=ON
""", env = { MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" }, description = "Configure CMake for Debug build" }
build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/release -j --target all", depends-on = [
"config",
], description = "Build Release version" }
build_dev = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/debug -j --target all", depends-on = [
"config_dev",
], description = "Build Debug version" }
build_fast = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/release -j4 --target all", depends-on = [
"config",
], description = "Build Release version with limited parallelism" }
test = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp/release --output-on-failure", depends-on = [
"build",
], description = "Run C++ tests (Release)" }
test_dev = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp/debug --output-on-failure", depends-on = [
"build_dev",
], description = "Run C++ tests (Debug)" }
test_verbose = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp/release --output-on-failure --verbose", depends-on = [
"build",
], description = "Run C++ tests with verbose output" }
hello_world = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/hello_world", depends-on = [
"build",
], description = "Run hello world example" }
convert_model = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/convert_model", depends-on = [
"build",
], description = "Run model conversion tool" }
c3d_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/c3d_viewer", depends-on = [
"build",
], description = "Run C3D file viewer" }
fbx_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/fbx_viewer", depends-on = [
"build",
], description = "Run FBX file viewer" }
glb_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/glb_viewer", depends-on = [
"build",
], description = "Run GLB file viewer" }
urdf_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/urdf_viewer", depends-on = [
"build",
], description = "Run URDF file viewer" }
bvh_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/bvh_viewer", depends-on = [
"build",
], description = "Run BVH file viewer" }
usd_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/usd_viewer", depends-on = [
"build",
], description = "Run USD file viewer" }
process_markers = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/process_markers_app", depends-on = [
"build",
], description = "Run marker processing application" }
refine_motion = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/refine_motion", depends-on = [
"build",
], description = "Run motion refinement tool" }
export_objs = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/export_objs", depends-on = [
"build",
], description = "Export animated mesh sequence as objs" }
animate_shapes = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/release/animate_shapes", depends-on = [
"build",
], description = "Export animation of blendshapes" }
install = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/release -j --target install", depends-on = [
"build",
], description = "Install built libraries and executables" }
install_no_build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/release -j --target install", description = "Install libraries and executables without rebuilding first" }
tracy = { cmd = "tracy-profiler", description = "Launch Tracy profiler GUI" }
test_py = { cmd = "pytest pymomentum/test/", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py",
], description = "Run Python tests" }
test_py_verbose = { cmd = "pytest pymomentum/test/ -v", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py",
], description = "Run Python tests with verbose output" }
doc_py_no_build = { cmd = "sphinx-build -a -E -W -b html pymomentum/doc build/python_api_doc", description = "Build Python API documentation without rebuilding first" }
doc_py = { cmd = "sphinx-build -a -E -W -b html pymomentum/doc build/python_api_doc", depends-on = [
"build_py",
], description = "Build Python API documentation with warnings as errors" }
open_doc_py = { cmd = "open build/python_api_doc/index.html", depends-on = [
"doc_py",
], description = "Open Python documentation in browser" }
# ==================
# PyPI Publishing
# ==================
# All wheel tasks are variant-aware via PYMOMENTUM_VARIANT env var (defaults to "core").
# These tasks only build PyPI distributions; Conda/Pixi package splitting belongs in the conda-forge feedstock.
# Usage:
# Core: pixi run -e py312 wheel_build
# CPU: PYMOMENTUM_VARIANT=cpu pixi run -e py312 wheel_build
# GPU: PYMOMENTUM_VARIANT=gpu pixi run -e py312 wheel_build
# Generate pyproject-pypi-{core,cpu,gpu}-py{ver}.toml from template
# This task is mainly for CI. For local use, run directly:
# python scripts/generate_pyproject.py --torch-min-py312 X.X --torch-max-py312 X.X --torch-min-py313 Y.Y --torch-max-py313 Y.Y
generate_pyproject = { cmd = "python scripts/generate_pyproject.py", description = "Generate PyPI pyproject.toml files from template (uses defaults from script)" }
# Clean wheel build artifacts
wheel_clean = { cmd = """
rm -rf dist wheelhouse; \
find build -maxdepth 1 -type f \\( -name '*.whl' -o -name '*.tar.gz' \\) -delete 2>/dev/null || true
""", description = "Clean wheel build artifacts for a fresh start" }
# Check wheel files with twine (variant-aware)
wheel_check = { cmd = """
python -c "import glob, os, subprocess, sys; aliases = {'base': 'core', 'torch_cpu': 'cpu', 'torch_gpu': 'gpu'}; variant = aliases.get(os.environ.get('PYMOMENTUM_VARIANT', 'core'), os.environ.get('PYMOMENTUM_VARIANT', 'core')); patterns = {'core': 'dist/pymomentum_core-*.whl', 'cpu': 'dist/pymomentum_cpu-*.whl', 'gpu': 'dist/pymomentum_gpu-*.whl'}; pattern = patterns[variant]; wheels = glob.glob(pattern); print(f'Checking {variant} wheels: {wheels}'); sys.exit(1 if not wheels else subprocess.call(['twine', 'check'] + wheels))"
""", depends-on = [
"wheel_build",
], description = "Check wheel files with twine" }
# Test wheel imports in a clean environment using uv
wheel_test = { cmd = "python scripts/test_wheel.py", depends-on = [
"wheel_build",
], description = "Test wheel imports in a clean virtual environment using uv" }
# Publish to TestPyPI for testing (variant-aware)
wheel_publish_testpypi = { cmd = "python -c \"import glob, os, subprocess, sys; aliases = {'base': 'core', 'torch_cpu': 'cpu', 'torch_gpu': 'gpu'}; variant = aliases.get(os.environ.get('PYMOMENTUM_VARIANT', 'core'), os.environ.get('PYMOMENTUM_VARIANT', 'core')); patterns = {'core': 'dist/pymomentum_core-*.whl', 'cpu': 'dist/pymomentum_cpu-*.whl', 'gpu': 'dist/pymomentum_gpu-*.whl'}; pattern = patterns[variant]; wheels = glob.glob(pattern); print(f'Publishing {variant} wheels to TestPyPI: {wheels}'); sys.exit(1 if not wheels else subprocess.call(['twine', 'upload', '--repository', 'testpypi', '--skip-existing'] + wheels))\"", depends-on = [
"wheel_check",
"wheel_test",
], description = "Publish to TestPyPI for testing" }
# Variant-aware wheel build (PYMOMENTUM_VARIANT defaults to "core")
wheel_build = { cmd = """
python scripts/build_pypi_wheel.py
""", depends-on = [
"generate_pyproject",
], description = "Build wheel for current Python version (set PYMOMENTUM_VARIANT=cpu or gpu for Torch extensions)" }
wheel_repair = { cmd = "echo 'wheel_repair is handled by platform-specific tasks'", description = "Repair wheel (platform-specific, see target.*.tasks)" }
# Variant-aware publish (PYMOMENTUM_VARIANT defaults to "core")
wheel_publish = { cmd = """
python -c "import glob, os, subprocess, sys; variant = os.environ.get('PYMOMENTUM_VARIANT', 'core'); variant = {'base': 'core', 'torch_cpu': 'cpu', 'torch_gpu': 'gpu'}.get(variant, variant); repos = {'core': 'pymomentum-core', 'cpu': 'pymomentum-cpu', 'gpu': 'pymomentum-gpu'}; patterns = {'core': 'dist/pymomentum_core-*.whl', 'cpu': 'dist/pymomentum_cpu-*.whl', 'gpu': 'dist/pymomentum_gpu-*.whl'}; repo = repos[variant]; pattern = patterns[variant]; wheels = glob.glob(pattern); print(f'Publishing {pattern} to {repo}'); sys.exit(1 if not wheels else subprocess.call(['twine', 'upload', '--repository', repo] + wheels))"
""", depends-on = [
"wheel_check",
"wheel_test",
], description = "Publish wheels to PyPI (set PYMOMENTUM_VARIANT=cpu or gpu for Torch extensions)" }
#===========
# linux-64
#===========
[target.linux-64.dependencies]
nvtx-c = ">=3.1.0" # TODO: Add to pytorch as run dep
sysroot_linux-64 = ">=2.28,<3"
tracy-profiler-gui = ">=0.11.1,<0.13" # not available on linux-aarch64
cibuildwheel = ">=2.22.0,<3" # not available on linux-aarch64
twine = ">=6.1.0,<7" # not available on linux-aarch64
# NOTE: patchelf, auditwheel, podman are in [feature.gpu-wheel-build] only —
# they are wheel-repair/container tools not needed by GPU test environments.
[target.linux-64.tasks]
# Linux variant-aware wheel build uses cibuildwheel to produce manylinux_2_28 wheels
# Auto-detects container engine: respects CIBW_CONTAINER_ENGINE if set, otherwise detects docker/podman
# Set PYMOMENTUM_VARIANT=cpu or gpu for Torch extension builds.
wheel_build = { cmd = '''bash -c 'source scripts/detect_container_engine.sh && VARIANT=${PYMOMENTUM_VARIANT:-core} && if [ "$VARIANT" = base ]; then VARIANT=core; elif [ "$VARIANT" = torch_cpu ]; then VARIANT=cpu; elif [ "$VARIANT" = torch_gpu ]; then VARIANT=gpu; fi && PY_VER=$(python -c "import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))") && echo "Building $VARIANT wheel for Python $PY_VER" && python scripts/generate_pyproject.py && (rm -rf build/cp* 2>/dev/null || true) && cp pyproject.toml /tmp/pyproject-backup.toml && cp pyproject-pypi-${VARIANT}-py${PY_VER}.toml pyproject.toml && CIBW_BUILD="cp${PY_VER}-manylinux_x86_64" PYMOMENTUM_VARIANT="$VARIANT" cibuildwheel --platform linux --output-dir dist . ; cp /tmp/pyproject-backup.toml pyproject.toml && rm /tmp/pyproject-backup.toml && echo "Wheels created:" && ls -la dist/' ''', description = "Build wheel using cibuildwheel (set PYMOMENTUM_VARIANT=cpu or gpu for Torch extensions)" }
wheel_repair = { cmd = "echo 'wheel_repair: cibuildwheel already handled repair in wheel_build'", description = "Repair handled by cibuildwheel (no-op on Linux)" }
# TODO: Check sha256 of fbx202037_fbxsdk_linux
install_fbxsdk = { cmd = """
mkdir -p .deps \
&& curl -fsSL https://damassets.autodesk.net/content/dam/autodesk/www/files/fbx202037_fbxsdk_gcc_linux.tar.gz -o .deps/fbx_sdk.tar.gz \
&& mkdir -p .deps/fbxsdk_download \
&& tar -xzf .deps/fbx_sdk.tar.gz -C .deps/fbxsdk_download \
&& rm .deps/fbx_sdk.tar.gz \
&& chmod ugo+x .deps/fbxsdk_download/fbx202037_fbxsdk_linux \
&& mkdir -p .deps/fbxsdk/2020.3.7 \
&& yes yes | .deps/fbxsdk_download/fbx202037_fbxsdk_linux .deps/fbxsdk/2020.3.7 \
&& rm -rf .deps/fbxsdk_download/fbx202037_fbxsdk_linux
""", outputs = [
".deps/fbxsdk/2020.3.7",
] }
install_deps = { depends-on = ["install_fbxsdk"] }
config = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/release \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=ON \
-DMOMENTUM_ENABLE_FBX_SAVING=ON \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_PROFILING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_INSTALL_EXAMPLES=ON \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DMOMENTUM_USE_SYSTEM_TRACY=ON
""", env = { FBXSDK_PATH = ".deps/fbxsdk", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" }, depends-on = [
"install_deps",
] }
config_dev = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/debug \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=ON \
-DMOMENTUM_ENABLE_FBX_SAVING=ON \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_PROFILING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_INSTALL_EXAMPLES=ON \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DMOMENTUM_USE_SYSTEM_TRACY=ON
""", env = { FBXSDK_PATH = ".deps/fbxsdk", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" }, depends-on = [
"install_deps",
] }
build_py = { cmd = "pip install . -v --no-build-isolation", env = { FBXSDK_PATH = ".deps/fbxsdk", CMAKE_ARGS = """
-DMOMENTUM_ENABLE_FBX_SAVING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=OFF \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DBUILD_SHARED_LIBS=OFF
""", MOMENTUM_ENABLE_SIMD = "ON", TORCH_CUDA_ARCH_LIST = "5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX" }, depends-on = [
"install_deps",
] }
test_py = { cmd = "pytest pymomentum/test/", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py",
] }
doc_py = { cmd = "sphinx-build -a -E -W -b html pymomentum/doc build/python_api_doc", depends-on = [
"build_py",
] }
open_doc_py = { cmd = "open build/python_api_doc/index.html", depends-on = [
"doc_py",
] }
#===============
# linux-aarch64
#===============
[target.linux-aarch64.dependencies]
sysroot_linux-aarch64 = ">=2.28,<3"
[target.linux-aarch64.tasks]
build_py = { cmd = "pip install . -v --no-build-isolation", env = { CMAKE_ARGS = """
-DMOMENTUM_ENABLE_FBX_SAVING=OFF \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=OFF \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_CXX_FLAGS=-fsigned-char
""", MOMENTUM_ENABLE_SIMD = "ON" } }
test_py = { cmd = "pytest pymomentum/test/", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py",
] }
#============
# osx-64
#============
[target.osx.dependencies]
tracy-profiler-gui = ">=0.11.1,<0.13"
cibuildwheel = ">=2.22.0,<3"
twine = ">=6.1.0,<7"
[target.osx.tasks]
build_py = { cmd = "pip install . -v", env = { CMAKE_ARGS = """
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DBUILD_SHARED_LIBS=OFF
""", MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
# TODO: Remove -k option, once saving tests are disabled programmatically when Autodesk FBX SDK is unavailable (FBX loading always works via OpenFBX)
test_py = { cmd = "pytest pymomentum/test/ -k 'not (TestFBXIO and (test_save_motions_with_joint_params or test_save_motions_with_model_params))'", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py", "install",
] }
doc_py = { cmd = "sphinx-build -a -E -W -b html pymomentum/doc build/python_api_doc", depends-on = [
"build_py",
] }
open_doc_py = { cmd = "open build/python_api_doc/index.html", depends-on = [
"doc_py",
] }
wheel_repair = { cmd = """
python -m pip install "delocate>=0.13,<0.14" && \
python scripts/repair_macos_wheel.py
""", description = "Repair macOS wheel using delocate (set PYMOMENTUM_VARIANT=cpu or gpu for Torch extensions)" }
#============
# osx-arm64
#============
[target.osx-arm64.dependencies]
# PyPI PyTorch bundles libomp, so keep NumPy's BLAS on a pthread runtime.
blas = { version = ">=2.135,<3", build = "blis" }
blis = { version = ">=2,<3", build = "pthreads_*" }
[target.osx-arm64.tasks]
build_py = { cmd = "pip install . -v", env = { CMAKE_ARGS = """
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DBUILD_SHARED_LIBS=OFF
""", MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
# TODO: Remove -k option, once saving tests are disabled programmatically when Autodesk FBX SDK is unavailable (FBX loading always works via OpenFBX)
test_py = { cmd = "pytest pymomentum/test/ -k 'not (TestFBXIO and (test_save_motions_with_joint_params or test_save_motions_with_model_params))'", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py", "install",
] }
doc_py = { cmd = "sphinx-build -a -E -W -b html pymomentum/doc build/python_api_doc", depends-on = [
"build_py",
] }
open_doc_py = { cmd = "open build/python_api_doc/index.html", depends-on = [
"doc_py",
] }
#=========
# win-64
#=========
[target.win-64.dependencies]
delvewheel = ">=1.8.7,<2"
tracy-profiler-gui = ">=0.11.1,<0.13"
cibuildwheel = ">=2.22.0,<3"
twine = ">=6.1.0,<7"
[target.win-64.activation.env]
# Pixi sets these automatically on Windows, but this breaks Ninja.
CMAKE_GENERATOR_INSTANCE = ""
CMAKE_GENERATOR_PLATFORM = ""
CMAKE_GENERATOR_TOOLSET = ""
[target.win-64.tasks]
# On Windows, we can't pass files as individual args since args buffer is too
# small, fails with `[WinError 206] The filename or extension is too long`.
lint = { cmd = """
mkdir -p build && git ls-files "axel/*.h" "axel/*.cpp" "momentum/*.h" "momentum/*.cpp" "pymomentum/*.h" "pymomentum/*.cpp" > build/cf-sources-list.txt && clang-format -i --files=build/cf-sources-list.txt
"""}
lint-check = { cmd = """
mkdir -p build && git ls-files "axel/*.h" "axel/*.cpp" "momentum/*.h" "momentum/*.cpp" "pymomentum/*.h" "pymomentum/*.cpp" > build/cf-sources-list.txt && clang-format --dry-run --Werror --files=build/cf-sources-list.txt
"""}
# In Windows CI, sccache wraps compiler invocations. Embed debug information
# in object files because MSVC compiler PDBs cannot be cached reliably.
config = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp \
-G "Ninja Multi-Config" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW \
-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT="$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>" \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_ENABLE_PROFILING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_INSTALL_EXAMPLES=ON \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DMOMENTUM_USE_SYSTEM_TRACY=ON
""", env = { BUILD_SHARED_LIBS = "ON", CMAKE_GENERATOR_INSTANCE = "", CMAKE_GENERATOR_PLATFORM = "", CMAKE_GENERATOR_TOOLSET = "", MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_BUILD_PYMOMENTUM = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
config_vs = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp_vs \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_ENABLE_PROFILING=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_INSTALL_EXAMPLES=ON \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DMOMENTUM_USE_SYSTEM_TRACY=ON
""", env = { BUILD_SHARED_LIBS = "ON", CMAKE_GENERATOR_INSTANCE = "", CMAKE_GENERATOR_PLATFORM = "", CMAKE_GENERATOR_TOOLSET = "", MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_BUILD_PYMOMENTUM = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
open_vs = { cmd = "cmd /c \"start build/{{ pixi.environment.name }}/cpp_vs/momentum.sln\"", depends-on = [
"config_vs",
] }
build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config Release --parallel && echo 'Copying axel.dll to exe directory.' && cp build/$PIXI_ENVIRONMENT_NAME/cpp/axel/Release/axel.dll build/$PIXI_ENVIRONMENT_NAME/cpp/Release", depends-on = [
"config",
] }
build_fast = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config Release --parallel 4 && echo 'Copying axel.dll to exe directory.' && cp build/$PIXI_ENVIRONMENT_NAME/cpp/axel/Release/axel.dll build/$PIXI_ENVIRONMENT_NAME/cpp/Release", depends-on = [
"config",
], description = "Build Release version with limited parallelism" }
build_dev = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --config Debug --parallel && echo 'Copying axel.dll to exe directory.' && cp build/$PIXI_ENVIRONMENT_NAME/cpp/axel/Debug/axel.dll build/$PIXI_ENVIRONMENT_NAME/cpp/Debug", depends-on = [
"config",
] }
test = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp --output-on-failure --build-config Release", depends-on = [
"build",
] }
test_dev = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp --output-on-failure --build-config Debug", depends-on = [
"build_dev",
] }
hello_world = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/hello_world.exe", depends-on = [
"build",
] }
convert_model = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/convert_model.exe", depends-on = [
"build",
] }
c3d_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/c3d_viewer.exe", depends-on = [
"build",
] }
fbx_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/fbx_viewer.exe", depends-on = [
"build",
] }
glb_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/glb_viewer.exe", depends-on = [
"build",
] }
urdf_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/urdf_viewer.exe", depends-on = [
"build",
] }
bvh_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/bvh_viewer.exe", depends-on = [
"build",
] }
usd_viewer = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/usd_viewer.exe", depends-on = [
"build",
] }
process_markers = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/process_markers_app.exe", depends-on = [
"build",
] }
refine_motion = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/refine_motion.exe", depends-on = [
"build",
] }
export_objs = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/export_objs.exe", depends-on = [
"build",
] }
animate_shapes = { cmd = "build/$PIXI_ENVIRONMENT_NAME/cpp/Release/animate_shapes.exe", depends-on = [
"build",
] }
install = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --target install --config Release --parallel", depends-on = [
"build",
] }
install_no_build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp --target install --config Release --parallel" }
tracy = { cmd = "tracy-profiler.exe" }
build_py = { cmd = "pip install . -v", env = { CMAKE_ARGS = """
-DMOMENTUM_ENABLE_FBX_SAVING=$MOMENTUM_ENABLE_FBX_SAVING \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=OFF \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON \
-DBUILD_SHARED_LIBS=OFF
""", CMAKE_GENERATOR = "Ninja", CMAKE_GENERATOR_INSTANCE = "", CMAKE_GENERATOR_PLATFORM = "", CMAKE_GENERATOR_TOOLSET = "", MOMENTUM_ENABLE_FBX_SAVING = "OFF", MOMENTUM_ENABLE_SIMD = "ON", TORCH_CUDA_ARCH_LIST = "5.0;6.0;6.1;7.0;7.5;8.0;8.6;8.9;9.0+PTX" } }
# TODO: Remove -k option, once saving tests are disabled programmatically when Autodesk FBX SDK is unavailable (FBX loading always works via OpenFBX)
test_py = { cmd = "pytest pymomentum/test/ -k 'not (TestFBXIO and (test_save_motions_with_joint_params or test_save_motions_with_model_params))'", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends-on = [
"build_py",
] }
# Windows variant-aware wheel build using pip wheel + delvewheel
# Note: Windows doesn't use cibuildwheel because conda-forge provides all dependencies
# Set PYMOMENTUM_VARIANT=cpu or gpu for Torch extension builds.
wheel_build = { cmd = """
python scripts/generate_pyproject.py && \
python scripts/build_pypi_wheel.py
""", env = { CMAKE_GENERATOR = "Ninja", CMAKE_GENERATOR_INSTANCE = "", CMAKE_GENERATOR_PLATFORM = "", CMAKE_GENERATOR_TOOLSET = "" }, description = "Build wheel for Windows (set PYMOMENTUM_VARIANT=cpu or gpu for Torch extensions)" }
# Repair wheel using delvewheel - variant-aware (bundles DLLs for standalone distribution)
wheel_repair = { cmd = """
python -c "import glob, os; variant = os.environ.get('PYMOMENTUM_VARIANT', 'core'); variant = {'base': 'core', 'torch_cpu': 'cpu', 'torch_gpu': 'gpu'}.get(variant, variant); patterns = {'core': 'dist/pymomentum_core-*.whl', 'cpu': 'dist/pymomentum_cpu-*.whl', 'gpu': 'dist/pymomentum_gpu-*.whl'}; wheels = glob.glob(patterns[variant]); print(f'Found {variant} wheels: {wheels}'); exit(0 if wheels else 1)" && \
python -c "import glob, os, subprocess, sys; variant = os.environ.get('PYMOMENTUM_VARIANT', 'core'); variant = {'base': 'core', 'torch_cpu': 'cpu', 'torch_gpu': 'gpu'}.get(variant, variant); patterns = {'core': 'dist/pymomentum_core-*.whl', 'cpu': 'dist/pymomentum_cpu-*.whl', 'gpu': 'dist/pymomentum_gpu-*.whl'}; wheels = glob.glob(patterns[variant]); command = ['python', '-m', 'delvewheel', 'repair', '--wheel-dir', 'dist']; command += ['--exclude', 'torch.dll;torch_cpu.dll;torch_cuda.dll;torch_cuda_linalg.dll;torch_python.dll;torch_global_deps.dll;c10.dll;c10_cuda.dll;caffe2_nvrtc.dll'] if variant != 'core' else []; sys.exit(subprocess.call(command + wheels))"
""", description = "Repair Windows wheel using delvewheel (set PYMOMENTUM_VARIANT=cpu or gpu for Torch extensions)" }
#==============
# Feature: CPU
#==============
[feature.py312]
dependencies = { python = "3.12.*" }
[feature.py313]
dependencies = { python = "3.13.*" }
#==============
# Feature: Rerun SDK versions
# Separate features for rerun dependencies to allow version switching
#==============
[feature.rerun-latest]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64"]
[feature.rerun-latest.dependencies]
rerun-sdk = ">=0.29.0"
librerun-sdk = ">=0.29.0"
[feature.rerun-legacy]
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
[feature.rerun-legacy.dependencies]
rerun-sdk = ">=0.23.3,<0.24"
librerun-sdk = ">=0.23.3,<0.24"
#==============
# Feature: viser (visualization)
# Bundled into every CPU/GPU dev environment alongside rerun-latest so the
# pixi-based dev loop (and OSS CI) can always exercise the viser_vis tests.
# Kept as its own feature for symmetry with rerun-latest/rerun-legacy and to
# make future version pinning easier.
# End users installing from PyPI keep visualization helpers optional via
# the `pymomentum-core[viser]` and `pymomentum-core[rerun]` extras in
# pyproject-pypi.toml.j2.
#==============
[feature.viser]
platforms = ["linux-64", "linux-aarch64", "osx-64", "osx-arm64", "win-64"]
[feature.viser.dependencies]
# viser (pypi) requires rich<15.0.0. Other conda deps in these envs (cibuildwheel,
# twine) accept rich>=15, so without this pin the conda solver picks rich-15 and
# the pypi solve for viser fails. Drop this pin once viser allows rich>=15.
rich = ">=13.3.3,<15"
[feature.viser.pypi-dependencies]
viser = ">=1.0.24,<2"
#==============
# Feature: Minimal Build (for GPU wheel builds with limited disk space)
# This feature includes only the essential dependencies for building pymomentum
# It's significantly smaller than the full default environment (~1.5GB vs ~4GB)
#==============
[feature.minimal-build]
platforms = ["linux-64"]
# Essential build tools and runtime/build dependencies (from CMakeLists.txt find_package calls)
[feature.minimal-build.dependencies]
cmake = ">=4.3.0,<5"
ninja = ">=1.13.1,<2"
blas = ">=2.135,<3"
ceres-solver = ">=2.2.0,<3"
cli11 = ">=2.5.0,<3"
dispenso = ">=1.4.0,<2"
eigen = ">=5.0.0,<5.1"
ezc3d = ">=1.5.19,<2"
drjit-cpp = ">=1.2.0,<2"
fmt = ">=11.2.0,<12"
fx-gltf = ">=2.0.0,<3"
indicators = ">=2.3,<3"
ms-gsl = ">=4.2.0,<5"
nlohmann_json = ">=3.12.0,<4"
openfbx = ">=0.9,<0.10"
re2 = ">=2025.8.12,<2026"
spdlog = ">=1.15.3,<2"
urdfdom = ">=4.0.1,<5"
zlib = ">=1.3.1,<2"
#==============
# Feature: GPU Development (requires CUDA on host)
# For development and testing with GPU - NOT for wheel building
#==============
[feature.py312-cuda129]
platforms = ["linux-64-cuda-12", "win-64-cuda-12"]
dependencies = { cuda-compiler = ">=12.9.0,<13", cuda-libraries-dev = "12.9.*", nvtx-c = ">=3.1.1", cuda-version = "12.9.*", python = "3.12.*", pytorch-gpu = ">=2.8.0,<3" }
# NOTE: py313-cuda129 feature removed — pytorch-gpu does not yet support Python 3.13 on conda-forge.
# Re-add when pytorch-gpu >=2.x has py313 builds available.
#==============
# Feature: GPU Wheel Build (no CUDA required on host)
# For building GPU wheels via cibuildwheel - builds happen in containers
# Works both locally (podman) and in CI (docker)
#==============
[feature.gpu-wheel-build]
platforms = ["linux-64"]
[feature.gpu-wheel-build.dependencies]
jinja2 = ">=3.1.0,<4"
cibuildwheel = ">=2.22.0,<3"
twine = ">=6.1.0,<7"
pip = ">=25.2,<26"
# Wheel repair and container tools — only needed for wheel-build environments
patchelf = ">=0.17.2,<0.18"
auditwheel = ">=6.4.2,<7"
podman = ">=5.0.0,<6"
[feature.gpu-wheel-build-py312]
platforms = ["linux-64"]
dependencies = { python = "3.12.*" }
[feature.gpu-wheel-build-py312.tasks]
# Torch GPU wheel build uses cibuildwheel with PYMOMENTUM_VARIANT=gpu.
wheel_build = { cmd = "bash -c 'source scripts/detect_container_engine.sh && VARIANT=${PYMOMENTUM_VARIANT:-gpu} && case \"$VARIANT\" in base) VARIANT=core ;; torch_cpu) VARIANT=cpu ;; torch_gpu) VARIANT=gpu ;; esac && PY_VER=312 && echo Building $VARIANT wheel for Python $PY_VER && python scripts/generate_pyproject.py && (rm -rf build/cp* 2>/dev/null || true) && cp pyproject.toml /tmp/pyproject-backup.toml && cp pyproject-pypi-${VARIANT}-py${PY_VER}.toml pyproject.toml && PYMOMENTUM_VARIANT=\"$VARIANT\" cibuildwheel --platform linux --output-dir dist . ; cp /tmp/pyproject-backup.toml pyproject.toml && rm /tmp/pyproject-backup.toml && echo Wheels created: && ls -la dist/'", env = { PYMOMENTUM_VARIANT = "gpu", CIBW_BUILD = "cp312-manylinux_x86_64" }, description = "Build Torch GPU wheel using cibuildwheel (auto-detects docker/podman)" }
wheel_repair = { cmd = "echo 'wheel_repair: cibuildwheel already handled repair in wheel_build'", description = "Repair handled by cibuildwheel (no-op)" }
wheel_check = { cmd = "twine check dist/pymomentum_gpu-*.whl", depends-on = [
"wheel_build",
], description = "Check wheel files with twine" }
wheel_publish = { cmd = "twine upload --repository pymomentum-gpu dist/pymomentum_gpu-*.whl", depends-on = [
"wheel_check",
], description = "Publish Torch GPU wheels to PyPI" }
[feature.gpu-wheel-build-py313]
platforms = ["linux-64"]
dependencies = { python = "3.13.*" }
[feature.gpu-wheel-build-py313.tasks]
# Torch GPU wheel build uses cibuildwheel with PYMOMENTUM_VARIANT=gpu.
wheel_build = { cmd = "bash -c 'source scripts/detect_container_engine.sh && VARIANT=${PYMOMENTUM_VARIANT:-gpu} && case \"$VARIANT\" in base) VARIANT=core ;; torch_cpu) VARIANT=cpu ;; torch_gpu) VARIANT=gpu ;; esac && PY_VER=313 && echo Building $VARIANT wheel for Python $PY_VER && python scripts/generate_pyproject.py && (rm -rf build/cp* 2>/dev/null || true) && cp pyproject.toml /tmp/pyproject-backup.toml && cp pyproject-pypi-${VARIANT}-py${PY_VER}.toml pyproject.toml && PYMOMENTUM_VARIANT=\"$VARIANT\" cibuildwheel --platform linux --output-dir dist . ; cp /tmp/pyproject-backup.toml pyproject.toml && rm /tmp/pyproject-backup.toml && echo Wheels created: && ls -la dist/'", env = { PYMOMENTUM_VARIANT = "gpu", CIBW_BUILD = "cp313-manylinux_x86_64" }, description = "Build Torch GPU wheel using cibuildwheel (auto-detects docker/podman)" }
wheel_repair = { cmd = "echo 'wheel_repair: cibuildwheel already handled repair in wheel_build'", description = "Repair handled by cibuildwheel (no-op)" }
wheel_check = { cmd = "twine check dist/pymomentum_gpu-*.whl", depends-on = [
"wheel_build",
], description = "Check wheel files with twine" }
wheel_publish = { cmd = "twine upload --repository pymomentum-gpu dist/pymomentum_gpu-*.whl", depends-on = [
"wheel_check",
], description = "Publish Torch GPU wheels to PyPI" }
#==============
# Environments
#==============
[environments]
# CPU environments (includes latest rerun + viser)
py312 = ["py312", "rerun-latest", "viser"]
py313 = ["py313", "rerun-latest", "viser"]
# GPU development environments (requires CUDA on host)
# Use these for testing GPU features locally
py312-cuda129 = ["py312-cuda129", "rerun-latest", "viser"]
gpu = ["py312-cuda129", "rerun-latest", "viser"]
# GPU wheel build environments (no CUDA required on host)
# Use these for building GPU wheels - builds happen in containers
# Auto-detects container engine: docker (CI) or podman (local)
gpu-wheel-build-py312 = ["gpu-wheel-build", "gpu-wheel-build-py312"]
gpu-wheel-build-py313 = ["gpu-wheel-build", "gpu-wheel-build-py313"]
# Minimal build environment (for GPU wheel builds with limited disk space in containers)
# Intentionally omits viser to keep the image small.
minimal-build = ["minimal-build", "rerun-latest"]
# Legacy dependencies environments (for internal BUCK build compatibility testing)
# Uses rerun 0.23.x to match internal build system
legacy-deps = ["py312", "rerun-legacy", "viser"]
legacy-deps-py313 = ["py313", "rerun-legacy", "viser"]
# Default environment
default = ["py312", "rerun-latest", "viser"]