gt4sd-core icon indicating copy to clipboard operation
gt4sd-core copied to clipboard

Installation on M1 Macs

Open MAlberts99 opened this issue 1 year ago • 3 comments

Installing gt4sd currently only works on M1 Macs through the use of Rosetta (an x86 emulator). When trying to install on an M1 mac natively I ran into the following issues:

  • pytorch-scatter v2.0.9: Build from conda-forge fails, needs to be manually downloaded and installed
  • torch-sparse v0.6.15: building wheel fails, after upgrade of pip it works
  • tensorflow: not available for M1, use tensorflow-macos instead
  • molecule-generation, tables: Both fail because they can't link to the HD5 library. Not certain if this specific to my system or general M1, manual install fails as well

Tables has a version for M1 but it's only available for python 3.11 or higher.

MAlberts99 avatar Feb 10 '23 17:02 MAlberts99

HI @MAlberts99, Thanks for reporting this! I'm not surprised you ran into issues. The first step to verify as necessary condition is to check if all of the problematic packages have an M1 installation. If not, I dont see a clear path to solving this.

We wont actively seek support for M1 in the future unfortunately. If someone manages to set this up or is interested in compiling a PR, we would appreciate that very much since the core developer dont use M1 and have no way of validating such a workflow.

Installing submodules selectively via package namespacing could solve this for specific gt4sd algorithms but there's currently no plan to change the core structure to that.

jannisborn avatar Feb 13 '23 08:02 jannisborn

Hi @jannisborn We have a similar problem while building a docker with GPU support for the spark project. In addition, when running a cpu-based docker we encounter problems with the TF models. The result of running - from gt4sd.algorithms.core import AlgorithmConfiguration, is - The TensorFlow library was compiled to use AVX instructions, but these aren't available on your machine. qemu: uncaught target signal 6 (Aborted) - core dumped Is it possible to install gt4sd without TF?

egozi avatar Oct 02 '23 13:10 egozi

Hi @egozi, There's no canonical way to remove individual packages from the installation pipeline. Did you install gt4sd with GPU setup and ran the above code from a machine with GPU access?

Install with GPU access via:

conda env create -f conda_gpu.yml

More information: https://github.com/tensorflow/tensorflow/issues/24548

jannisborn avatar Oct 02 '23 14:10 jannisborn