-
Notifications
You must be signed in to change notification settings - Fork 9
/
pixi.toml
345 lines (319 loc) · 12 KB
/
pixi.toml
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
[project]
name = "momentum"
channels = ["conda-forge"]
platforms = ["linux-64", "osx-64", "osx-arm64", "win-64"]
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://facebookincubator.github.io/momentum/"
repository = "https://github.com/facebookincubator/momentum"
[build-dependencies]
boost = ">=1.85.0,<2"
c-compiler = ">=1.8.0,<2"
clang-format = ">=18.1.8,<19"
cmake = ">=3.30.5,<4"
cxx-compiler = ">=1.8.0,<2"
gtest = ">=1.15.2,<2"
ninja = ">=1.12.1,<2"
rerun-sdk = ">=0.19.1,<0.20"
pip = ">=24.3.1,<25"
pybind11 = ">=2.13.6,<3"
pytest = ">=8.3.3,<9"
scipy = ">=1.14.1,<2"
setuptools = ">=75.5.0,<76"
[dependencies]
blas = ">=2.125,<3"
ceres-solver = ">=2.2.0,<3"
cli11 = ">=2.4.2,<3"
dispenso = ">=1.3.0,<2"
eigen = ">=3.4.0,<4"
ezc3d = ">=1.5.17,<2"
drjit-cpp = ">=0.4.6,<0.5"
fmt = ">=11.0.2,<12"
fx-gltf = ">=2.0.0,<3"
librerun-sdk = ">=0.19.1,<0.20"
ms-gsl = ">=4.1.0,<5"
nlohmann_json = ">=3.11.3,<4"
openfbx = ">=0.9,<0.10"
openssl = ">=3.4.0,<4"
re2 = ">=2024.7.2,<2025"
spdlog = ">=1.15.0,<2"
[tasks]
clean = { cmd = """
rm -rf build \
&& rm -rf .pixi \
&& rm pixi.lock
""" }
lint = { cmd = "clang-format -i axel/**/*.h axel/**/*.cpp momentum/**/*.h momentum/**/*.cpp pymomentum/**/*.h pymomentum/**/*.cpp" }
config = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/release \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DMOMENTUM_BUILD_IO_FBX=$MOMENTUM_BUILD_IO_FBX \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON
""", env = { MOMENTUM_BUILD_IO_FBX = "OFF", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" } }
config_dev = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp/debug \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DMOMENTUM_BUILD_IO_FBX=$MOMENTUM_BUILD_IO_FBX \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON
""", env = { MOMENTUM_BUILD_IO_FBX = "OFF", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" } }
build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/release -j --target all", depends_on = [
"config",
] }
build_dev = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/debug -j --target all", depends_on = [
"config_dev",
] }
test = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp/release --output-on-failure", depends_on = [
"build",
] }
test_dev = { cmd = "ctest --test-dir build/$PIXI_ENVIRONMENT_NAME/cpp/debug --output-on-failure", depends_on = [
"build_dev",
] }
hello_world = { cmd = "build/hello_world", depends_on = ["build"] }
convert_model = { cmd = "build/convert_model", depends_on = ["build"] }
c3d_viewer = { cmd = "build/c3d_viewer", depends_on = ["build"] }
fbx_viewer = { cmd = "build/fbx_viewer", depends_on = ["build"] }
glb_viewer = { cmd = "build/glb_viewer", depends_on = ["build"] }
process_markers = { cmd = "build/process_markers_app", depends_on = ["build"] }
refine_motion = { cmd = "build/refine_motion", depends_on = ["build"] }
install = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp/release -j --target install", depends_on = [
"build",
] }
#===========
# linux-64
#===========
[target.linux-64.build-dependencies]
nvtx-c = ">=3.1.0" # TODO: Add to pytorch as run dep
[target.linux-64.dependencies]
pytorch = ">=2.4.0"
sysroot_linux-64 = ">=2.28"
[target.linux-64.tasks]
# 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 \
-DMOMENTUM_BUILD_IO_FBX=ON \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=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 \
-DMOMENTUM_BUILD_IO_FBX=ON \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON
""", env = { FBXSDK_PATH = ".deps/fbxsdk", MOMENTUM_ENABLE_SIMD = "ON", MOMENTUM_BUILD_PYMOMENTUM = "ON" }, depends_on = [
"install_deps",
] }
build_py = { cmd = "pip install . -vv", env = { FBXSDK_PATH = ".deps/fbxsdk", CMAKE_ARGS = """
-DMOMENTUM_BUILD_IO_FBX=ON \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD
""", MOMENTUM_ENABLE_SIMD = "ON" }, depends_on = [
"install_deps",
] }
test_py = { cmd = """
pytest \
pymomentum/test/test_closest_points.py \
pymomentum/test/test_fbx.py \
pymomentum/test/test_parameter_transform.py \
pymomentum/test/test_quaternion.py \
pymomentum/test/test_skel_state.py \
pymomentum/test/test_skeleton.py
""", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends_on = [
"build_py",
] }
#============
# osx-64
#============
[target.osx.build-dependencies]
[target.osx.dependencies]
pytorch = ">=2.4.0"
[target.osx.tasks]
build_py = { cmd = "pip install . -vv", env = { CMAKE_ARGS = """
-DMOMENTUM_BUILD_IO_FBX=$MOMENTUM_BUILD_IO_FBX \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD
""", MOMENTUM_BUILD_IO_FBX = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
test_py = { cmd = """
pytest \
pymomentum/test/test_closest_points.py \
pymomentum/test/test_fbx.py \
pymomentum/test/test_parameter_transform.py \
pymomentum/test/test_quaternion.py \
pymomentum/test/test_skel_state.py \
pymomentum/test/test_skeleton.py
""", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends_on = [
"build_py",
] }
#============
# osx-arm64
#============
[target.osx-arm64.build-dependencies]
[target.osx-arm64.dependencies]
pytorch = ">=2.4.0"
[target.osx-arm64.tasks]
build_py = { cmd = "pip install . -vv", env = { CMAKE_ARGS = """
-DMOMENTUM_BUILD_IO_FBX=$MOMENTUM_BUILD_IO_FBX \
-DMOMENTUM_ENABLE_SIMD=$MOMENTUM_ENABLE_SIMD
""", MOMENTUM_BUILD_IO_FBX = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
test_py = { cmd = """
pytest \
pymomentum/test/test_closest_points.py \
pymomentum/test/test_fbx.py \
pymomentum/test/test_parameter_transform.py \
pymomentum/test/test_quaternion.py \
pymomentum/test/test_skel_state.py \
pymomentum/test/test_skeleton.py
""", env = { MOMENTUM_MODELS_PATH = "momentum/" }, depends_on = [
"build_py",
] }
#=========
# win-64
#=========
[target.win-64.dependencies]
[target.win-64.tasks]
config = { cmd = """
cmake \
-S . \
-B build/$PIXI_ENVIRONMENT_NAME/cpp \
-G 'Visual Studio 17 2022' \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \
-DBUILD_SHARED_LIBS=OFF \
-DMOMENTUM_BUILD_EXAMPLES=ON \
-DMOMENTUM_BUILD_IO_FBX=$MOMENTUM_BUILD_IO_FBX \
-DMOMENTUM_BUILD_PYMOMENTUM=$MOMENTUM_BUILD_PYMOMENTUM \
-DMOMENTUM_BUILD_TESTING=ON \
-DMOMENTUM_ENABLE_SIMD=%MOMENTUM_ENABLE_SIMD% \
-DMOMENTUM_USE_SYSTEM_GOOGLETEST=ON \
-DMOMENTUM_USE_SYSTEM_PYBIND11=ON \
-DMOMENTUM_USE_SYSTEM_RERUN_CPP_SDK=ON
""", env = { MOMENTUM_BUILD_IO_FBX = "OFF", MOMENTUM_BUILD_PYMOMENTUM = "OFF", MOMENTUM_ENABLE_SIMD = "ON" } }
open_vs = { cmd = "cmd /c start build\\$PIXI_ENVIRONMENT_NAME\\cpp\\momentum.sln", depends_on = [
"config",
] }
build = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp -j --config Release", depends_on = [
"config",
] }
build_dev = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp -j --config 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",
] }
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",
] }
install = { cmd = "cmake --build build/$PIXI_ENVIRONMENT_NAME/cpp -j --target install --config Release", depends_on = [
"build",
] }
#==============
# Feature: CPU
#==============
[feature.cpu]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
#==============
# Feature: GPU
#==============
[feature.py312-cuda126]
channels = ["conda-forge"]
platforms = ["linux-64"]
system-requirements = { cuda = "12.0" }
channel-priority = "disabled"
dependencies = { cuda-toolkit = "12.*", pytorch = { version = "2.5.*", build = "cuda126_py312*", channel = "conda-forge" } }
[feature.py311-cuda126]
channels = ["conda-forge"]
platforms = ["linux-64"]
system-requirements = { cuda = "12.0" }
channel-priority = "disabled"
dependencies = { cuda-toolkit = "12.*", pytorch = { version = "2.5.*", build = "cuda126_py311*", channel = "conda-forge" } }
[feature.py310-cuda126]
channels = ["conda-forge"]
platforms = ["linux-64"]
system-requirements = { cuda = "12.0" }
channel-priority = "disabled"
dependencies = { cuda-toolkit = "12.*", pytorch = { version = "2.5.*", build = "cuda126_py310*", channel = "conda-forge" } }
#==============
# Environments
#==============
[environments]
py312-cuda126 = ["py312-cuda126"]
py311-cuda126 = ["py311-cuda126"]
py310-cuda126 = ["py310-cuda126"]
gpu = ["py312-cuda126"]
cpu = ["cpu"]
default = ["cpu"]