Skip to content

Latest commit

 

History

History
33 lines (29 loc) · 1.61 KB

File metadata and controls

33 lines (29 loc) · 1.61 KB

First install libtorch

Get libtorch v2.0.1 from the PyTorch website and extract the content of the zip file.

  • On Linux/Unix system you can download with:
    • wget https://download.pytorch.org/libtorch/cu116/libtorch-shared-with-deps-2.0.1%2Bcu118.zip
  • On macOS you can download with:
    • wget https://download.pytorch.org/libtorch/cpu/libtorch-macos-2.0.1.zip
  • Windows is not supported and will not be.

Then add the following to your .bashrc or equivalent, where /path/to/libtorch is the path to the directory that was created when unzipping the file:

export LIBTORCH_CXX11_ABI=0
export LIBTORCH=/path/to/libtorch # e.g. export LIBTORCH=/Users/mrvollger/lib/libtorch
export LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH
export DYLD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH

From crates.io crates.io version

Installation from crates.io requires the rust package manager cargo. You can find how to install cargo here. Furthermore, a recent version of gcc and cmake is required. I have tested and recommend gcc v10.2.0 and cmake v3.21.1, though other versions may work.

cargo install fibertools-rs

From github (active development)

cargo install --git https://github.com/mrvollger/fibertools-rs

to be able to debug in pyCharm I needed to also

cd .../libtorch/lib
cp libtorch_cpu.dylib libtorch.dylib libc10.dylib libiomp5.dylib /usr/local/lib