Skip to content

Commit

Permalink
Update documentation on arm installation
Browse files Browse the repository at this point in the history
Now ert is fully arm compatible, so this is redundant.
  • Loading branch information
oyvindeide committed Jan 24, 2024
1 parent 0465891 commit 1580e86
Showing 1 changed file with 0 additions and 44 deletions.
44 changes: 0 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,50 +30,6 @@ $ ert --help

For examples and help with configuration, see the [ert Documentation](https://ert.readthedocs.io/en/latest/getting_started/configuration/poly_new/guide.html#configuration-guide).

### Installing on Macs with ARM CPUs

A few of ert's dependencies aren't compiled for ARM CPUs. Because of this,
we need to do some Rosetta "hot swapping".

First, install Rosetta by running `softwareupdate --install-rosetta [--agree-to-license]`

Once Rosetta is installed, you can switch to an Intel based architecture by running:
`arch -x86_64 <SHELL_PATH>`. Note that if your shell is installed
as an ARM executable, this will error. If that's the case, you can simply pass
`/bin/zsh` as the shell path.

Now you're set to install Homebrew for Intel architectures:

`/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`

Now, to be able to hot swap between Intel and ARM architectures, add the following
to your shell profile config:

```sh
alias arm="env /usr/bin/arch -arm64 <SHELL_PATH> --login"
alias intel="env /usr/bin/arch -x86_64 <SHELL_PATH> --login"

local cpu=$(uname -m)

if [[ $cpu == "arm64" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi

if [[ $cpu == "x86_64" ]]; then
eval "$(/usr/local/homebrew/bin/brew shellenv)"
fi
```

Note: You can always check which architecture you're running by calling either
`arch` or `uname -m`.

This will allow you to switch between architectures by calling either `intel` or `arm`
from your terminal. Switching architectures will automatically source the correct
Hombrew executable for your architecture as well, which is key.

Now, simply switch to Intel, and install Python and set up a virtualenv as
instructed below.

## Developing

ert was originally written in C/C++ but most new code is Python.
Expand Down

0 comments on commit 1580e86

Please sign in to comment.