d351d3r / sabr-torch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SABR Torch Cpp

Install repo

$ git clone git@github.com:d351d3r/sabr-torch.git
$ cd sabr-torch

Install torch

$ wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
$ unzip libtorch-shared-with-deps-latest.zip

Install

$ mkdir build
$ cd build
$ cmake -DCMAKE_PREFIX_PATH=./libtorch ..
$ cmake --build . --config Release

Run:

$ ./sabr-torch

Build in Mac M1 with Lima

Install Lima first with brew:

$ 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

Run Lima with author's config:

$ limactl start --name=default etc/lima-default.yaml

Go to the working directory via Lima:

$ lima

Install dependencies:

$ sudo apt install -y gcc g++ make cmake

Build:

$ mkdir build
$ cd build
$ cmake -DCMAKE_PREFIX_PATH=./libtorch ..
$ cmake --build . --config Release

Run:

$ ./sabr-torch

About


Languages

Language:C++ 81.1%Language:Dockerfile 10.4%Language:CMake 7.3%Language:Makefile 1.2%