Skip to content

Commit

Permalink
remove M1-M3 instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
paulsonak authored Sep 5, 2024
1 parent b744dc6 commit d3eacc3
Showing 1 changed file with 2 additions and 103 deletions.
105 changes: 2 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Check out our new tutorial series that walks through AMPL's end-to-end modeling
## Table of contents
- [Install](#install)
- [Quick Install](#installation-quick-summary)
- [Install with M1 - M3 Chips](#install-with-m1---m3-chips)
- [Quick Install for M1 - M3 Chips](#installation-quick-summary-for-m1---m3-chips)
- [Jupyter kernel](#create-jupyter-notebook-kernel-optional)
- [Docker](#install-with-docker)
- [Uninstall](#uninstall)
Expand All @@ -44,6 +42,8 @@ Check out our new tutorial series that walks through AMPL's end-to-end modeling
## Install
AMPL 1.6 supports Python 3.9 CPU or CUDA-enabled machines using CUDA 11.8 on Linux. All other systems are experimental. For a quick install summary, see [here](#install-summary). We do not support other CUDA versions because there are multiple ML package dependency conflicts that can occur. For more information you can look at [DeepChem](https://deepchem.readthedocs.io/en/latest/get_started/installation.html), [TensorFlow](https://www.tensorflow.org/install/pip), [PyTorch](https://pytorch.org/get-started/locally/), [DGL](https://www.dgl.ai/pages/start.html).

For installation on Apple Silicon M Chips, please see the Docker container instructions.

### Create pip environment

#### 1. Create a virtual env with Python 3.9
Expand Down Expand Up @@ -152,107 +152,6 @@ cd ..
pip install -e .
```
---
## Install with M1 - M3 chips
AMPL is built on Linux machines but the instructions below have been tested successfully on several M-chip Macs. This local installation requires a few different steps compared to a Linux installation, including using a Linux emulator ([OrbStack](https://orbstack.dev) is recommended), installing Linux packages and using conda instead of venv to manage the Python version. If you have run into errors or found an even easier method for M chips, please [let us know](https://github.com/ATOMScience-org/AMPL/issues)!

### Install Orbstack
- Download and install Orbstack
- https://orbstack.dev/download
- Create a Linux machine
- Distribution select: Ubuntu
- Version select: 24.04 LTS (Noble Numbat)
- CPU type: Apple

### Installing Miniconda3
- Open Linux terminal in Orbstack
- Install wget

```bash
sudo apt update
sudo apt install wget
```
- Install Miniconda3

```bash
cd ~ # install miniconda in your Ubuntu home directory
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
chmod +x Miniconda3-latest-Linux-aarch64.sh
./Miniconda3-latest-Linux-aarch64.sh
source .bashrc # reload the shell with conda activated
```

### Create conda environment with Miniconda3

#### 1. Create a conda env with Python 3.9.12 and activate it
Your conda env will need 2.8Gb space.

```bash
conda create -n atomsci-env python=3.9.12
conda activate atomsci-env
```

#### 4. Clone AMPL repository
```bash
sudo apt install git # install git to Linux terminal
mkdir repos # optional - install repos in a new directory
cd repos # optional
git clone https://github.com/ATOMScience-org/AMPL.git # clones AMPL repository
```

#### 5. Install pip requirements
Depending on system performance, creating the environment can take some time.

- Install these packages onto your Ubuntu machine so that you don't receive h5py wheel build error or gcc error
```bash
sudo apt install pkg-config libhdf5-dev libxrender1 gcc
```
- Use the MChip installation requirements file:
```bash
pip install pip --upgrade
cd AMPL/pip
pip install -r mchip_requirements.txt
```

### Install AMPL
Run the following to build the AMPL modules. This is required.
> ***Note:*** *Should be in the AMPL directory*
```bash
# return to AMPL parent directory
cd ..
./build.sh
pip install -e .
```

---
## Installation Quick Summary for M1 - M3 chips
> ***Note:*** *Should run these commands on Ubuntu terminal through Orbstack*
```bash
sudo apt update
sudo apt install wget # install wget to Linux terminal

cd ~ # install miniconda in Linux home directory
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
chmod +x Miniconda3-latest-Linux-aarch64.sh
./Miniconda3-latest-Linux-aarch64.sh
source .bashrc # reload the shell with conda activated

conda create -n atomsci-env python=3.9.12 # create environment with Python 3.9.12
conda activate atomsci-env # activate atomsci-env environment

sudo apt install git # install git to Linux terminal
git clone https://github.com/ATOMScience-org/AMPL.git # clones AMPL repository

cd AMPL/pip
sudo apt install pkg-config lixrender1 libhdf5-dev gcc # fix h5py and gcc install errors

pip install pip --upgrade
pip install -r mchip_requirements.txt # install mchip_requirements.txt

cd .. # return to AMPL parent directory
./build.sh
pip install -e .
```
---
## Create jupyter notebook kernel (optional)
To run AMPL from Jupyter Notebook. To setup a new kernel, first activate your environment and then run the following command:

Expand Down

0 comments on commit d3eacc3

Please sign in to comment.