Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation instructions for ARM Macs (M1 and M2) #15

Closed
SeaCelo opened this issue Nov 10, 2022 · 6 comments · Fixed by #25
Closed

Update installation instructions for ARM Macs (M1 and M2) #15

SeaCelo opened this issue Nov 10, 2022 · 6 comments · Fixed by #25
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@SeaCelo
Copy link
Collaborator

SeaCelo commented Nov 10, 2022

We've tested the process of installing OG-ZAF on a "clean" Mac with the M1 chip. This computer had no previous installation of python, Anaconda, or dependencies. We tried to follow the installation instructions as written in the Read Me. During the installation, we ran into a few problems:

  • Late in the process an error required that users install Xcode Tools. Users should do this as a first step: xcode-select —install
  • Users should download the correct version of Anaconda and Python. The prominent link in the Anaconda page downloads the X86 version. Instead, users should go to the bottom of the installation page: Go here. Then select the version for the M1 (ARM) instead of x86 (Intel).
  • With Anaconda for M1 chips installed, you will get an error when you try conda env create -f environment.yml. This is because the "MKL" library will not be found (it is an Intel-only library). To fix this you must follow the instructions in this comment.

There are significant performance gains to using the appropriate version of Anaconda and Python on ARM Macs. The speedup in tests is 1.6-1.7x.

The installation instructions should reflect the platform-specific steps. I don't think the installation scripts can be written to take platform-specific steps, but this would be the preferred solution as it would simplify the process for users.

@SeaCelo SeaCelo added the documentation Improvements or additions to documentation label Nov 10, 2022
@SeaCelo SeaCelo self-assigned this Nov 10, 2022
@SeaCelo
Copy link
Collaborator Author

SeaCelo commented Nov 10, 2022

A full solution would probably involve creating a OG-CORE package for conda. The package can be installed with platform dependencies.
meta.yml
recipes
This is a much bigger change that would require testing on all platforms. For this issue I will focus on having instructions specific to the ARM Macs.

@sarvonz
Copy link
Contributor

sarvonz commented Nov 10, 2022

Adding to what @SeaCelo said, in my case with a "clean" Mac, after xcode-select --install, which install/upgrade the command line tool for Xcode, I did pip install lxml. There was an error during my first attempt to install the model which required the installation of lxml.

@SeaCelo
Copy link
Collaborator Author

SeaCelo commented Nov 11, 2022

Installing the ARM version of Anaconda, which installs the ARM version of Python, results in a 1.6-1.7x speedup.

@rickecon
Copy link
Collaborator

This issue is a continuation of Issue #3. Therefore, we are closing Issue #3, and the thread will continue here.

cc: @SeaCelo

@SeaCelo
Copy link
Collaborator Author

SeaCelo commented Nov 23, 2022

This issue is resolved by PR #16

@SeaCelo
Copy link
Collaborator Author

SeaCelo commented Jan 5, 2023

OG-CORE has updated its dependencies and no longer requires the mkl package that was causing trouble. I'm reopening to update the installation instructions for OG-ZAF to more closely follow OG-CORE.

PSLmodels/OG-Core#840

@SeaCelo SeaCelo reopened this Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants