flambeau
flambeau copied to clipboard
vendoring and wrapping torchvision, torchtext and torchaudio
Unlike regular PyTorch/LibTorch, torchvision, torchtext and torchaudio do not have a nice prebuilt executable that we can download.
So we need to either:
- get the library from conda or pip and discarding the Python part
- build the library ourselves on install
Note: we can skip the hell that is CMake and directly use Nim as a C++ build system
For example, for the Arcade learning Environment (Atari games emulator for Reinforcement Learning):
- Original code: https://github.com/mgbellemare/Arcade-Learning-Environment
- Nim build system: https://github.com/numforge/agent-smith/blob/a2d9251/third_party/ale_build.nim#L40-L83
- Bindings is independent: https://github.com/numforge/agent-smith/blob/a2d9251/third_party/ale_wrap.nim
Relevant thread: https://github.com/pytorch/vision/issues/2692 (Using torchvision C++ API without installing python)