$ git clone git@github.com:d351d3r/sabr-torch.git
$ cd sabr-torch
$ wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
$ unzip libtorch-shared-with-deps-latest.zip
$ mkdir build
$ cd build
$ cmake -DCMAKE_PREFIX_PATH=./libtorch ..
$ cmake --build . --config Release
$ ./sabr-torch
Build in Mac M1 with Lima
$ brew install lima
You can use your own Lima configuration file or use the author's
For better compatibility, it is recommended to use the architecture: arch: x86_64
Please note that the author's configs from the container have full access to the file system for convenience. Instead, you can give access to certain directories:
mounts:
- location: "~/project/"
mountPoint: "/project"
writable: true
$ limactl start --name=default etc/lima-default.yaml
$ lima
$ sudo apt install -y gcc g++ make cmake
$ mkdir build
$ cd build
$ cmake -DCMAKE_PREFIX_PATH=./libtorch ..
$ cmake --build . --config Release
$ ./sabr-torch