Giter Site home page Giter Site logo

Comments (2)

vthemelis avatar vthemelis commented on June 17, 2024

@Murphy-OrangeMud , did you manage to resolve this issue? I'm having a similar issue at the moment.

EDIT: I found the issue: I was pulling a very old version of torch because my OCaml version was old.

from ocaml-torch.

vthemelis avatar vthemelis commented on June 17, 2024

There are a few issues with installing this on an M1 Mac but here are the steps:

  • Download libtorch binaries (or build libtorch in your Mac). At the moment there are no official pre-build binaries. I downloaded my (unofficial) binaries from https://github.com/mlverse/libtorch-mac-m1/releases .
  • Double check what libtorch version is compatible with the current version of torch. Version 1.13.1 is the one you want with v0.16.0 version of torch.
  • Set the LIBTORCH environment variable to the directory that includes the include and lib directories.
  • Use the latest JaneStreet fork of this. Have a look at https://opam.ocaml.org/packages/torch/ for the current version.
    • This may require a newer OCaml version so check for that.
    • To install with opam:
opam install torch.v0.16.0 --ignore-constraints-on libtorch

Note that I had to ignore-constraints to avoid failing because libtorch is disabled for M1 Mac. Note also that I explicitly had to set the version of the package (JaneStreet version starts with v0 rather than 0) as I otherwise resolve to version 0.10 which is way too old.

from ocaml-torch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.