Skip to content

Commit 1d88757

Browse files
authored
Merge pull request #337 from ATOMScience-org/mchip_readme
update M chip instructions
2 parents 805b332 + 1efed13 commit 1d88757

File tree

2 files changed

+76
-71
lines changed

2 files changed

+76
-71
lines changed

README.md

Lines changed: 28 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ Go to the directory where the new environment directory be installed in. Define
5454
export ENVROOT=~/workspace # for LLNL LC users, use your workspace
5555
or
5656
export ENVROOT=~ # or the directory as your environment root
57-
cd $ENVROOT
5857
```
5958

6059
> *We use "workspace" and "atomsci-env" as an example here.*
@@ -130,7 +129,6 @@ pip install -e .
130129
## Installation Quick Summary
131130
```bash
132131
export ENVROOT=~/workspace # set ENVROOT example
133-
cd $ENVROOT # go to a convenient home directory
134132
# LLNL only:
135133
# module load python/3.9.12
136134

@@ -154,7 +152,7 @@ pip install -e .
154152
```
155153
---
156154
## Install with M1 - M3 chips
157-
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) or [Jax](https://github.com/google/jax#installation).
155+
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)!
158156

159157
### Install Orbstack
160158
- Download and install Orbstack
@@ -171,81 +169,51 @@ AMPL 1.6 supports Python 3.9 CPU or CUDA-enabled machines using CUDA 11.8 on Lin
171169
```bash
172170
sudo apt update
173171
sudo apt install wget
174-
sudo apt update
175172
```
176173
- Install Miniconda3
177-
- Make sure you are in the correct pathway when installing
178174

179175
```bash
176+
cd ~ # install miniconda in your Ubuntu home directory
180177
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
181178
chmod +x Miniconda3-latest-Linux-aarch64.sh
182179
./Miniconda3-latest-Linux-aarch64.sh
183-
~/miniconda3/bin/conda init # initialize the miniconda3
180+
source .bashrc # reload the shell with conda activated
184181
```
185182

186183
### Create conda environment with Miniconda3
187184

188-
#### 1. Create a conda env with Python 3.9.12
189-
Make sure to create your conda env in a convenient directory that has at least 12Gb space.
190-
191-
Go to the directory where the new environment directory be installed in. Define an environment variable - "ENVROOT".
192-
193-
```bash
194-
export ENVROOT=~/workspace # for LLNL LC users, use your workspace
195-
or
196-
export ENVROOT=~ # or the directory as your environment root
197-
cd $ENVROOT
198-
```
199-
200-
> *We use "workspace" and "atomsci-env" as an example here.*
201-
202-
```bash
203-
cd $ENVROOT
204-
conda create -n atomsci-env python=3.9.12 # creates atomsci-env with python 3.9.12
205-
```
206-
207-
#### 2. Activate the environment
185+
#### 1. Create a conda env with Python 3.9.12 and activate it
186+
Your conda env will need 2.8Gb space.
208187

209188
```bash
189+
conda create -n atomsci-env python=3.9.12
210190
conda activate atomsci-env
211191
```
212-
> ***Note:*** *If you are unable to activate your conda environment make sure you are in the 'base' conda environment when activating atomsci-env*
213-
```bash
214-
conda activate base # to switch into the 'base' conda environment
215-
```
216-
217-
#### 3. Update pip
218-
```bash
219-
pip install pip --upgrade
220-
```
221192

222193
#### 4. Clone AMPL repository
223194
```bash
224-
sudo apt update
225-
sudo apt install git # install git to Linux terminal
226-
sudo apt update
227-
git clone https://github.com/ATOMScience-org/AMPL.git # clones AMPL repository
195+
sudo apt install git # install git to Linux terminal
196+
mkdir repos # optional - install repos in a new directory
197+
cd repos # optional
198+
git clone https://github.com/ATOMScience-org/AMPL.git # clones AMPL repository
228199
```
229200

230201
#### 5. Install pip requirements
231202
Depending on system performance, creating the environment can take some time.
232-
> ***Note:*** *Based on which environment (CPU) you may have to edit or comment out jaxlib*
233203

234-
- Run these commands so that you don't receive h5py wheel build error or gcc error
204+
- Install these packages onto your Ubuntu machine so that you don't receive h5py wheel build error or gcc error
235205
```bash
236-
sudo apt install pkg-config
237-
sudo apt-get install libhdf5-dev
238-
sudo apt-get install libxrender1
239-
sudo apt-get -y install gcc
206+
sudo apt install pkg-config libhdf5-dev libxrender1 gcc
240207
```
241-
- CPU installation:
208+
- Use the MChip installation requirements file:
242209
```bash
210+
pip install pip --upgrade
243211
cd AMPL/pip
244-
pip install -r cpu_requirements.txt
212+
pip install -r mchip_requirements.txt
245213
```
246214

247215
### Install AMPL
248-
Run the following to build the "atomsci" modules. This is required.
216+
Run the following to build the AMPL modules. This is required.
249217
> ***Note:*** *Should be in the AMPL directory*
250218
```bash
251219
# return to AMPL parent directory
@@ -260,48 +228,37 @@ pip install -e .
260228
```bash
261229
sudo apt update
262230
sudo apt install wget # install wget to Linux terminal
263-
sudo apt update
264231

265-
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh # install Miniconda3 to Linux terminal
232+
cd ~ # install miniconda in Linux home directory
233+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
266234
chmod +x Miniconda3-latest-Linux-aarch64.sh
267-
./Miniconda3-latest-Linux-aarch64.sh
268-
~/miniconda3/bin/conda init # initialize Miniconda3
269-
270-
export ENVROOT=~/workspace # set ENVROOT example
271-
cd $ENVROOT # go to a convenient home directory
235+
./Miniconda3-latest-Linux-aarch64.sh
236+
source .bashrc # reload the shell with conda activated
237+
272238
conda create -n atomsci-env python=3.9.12 # create environment with Python 3.9.12
273-
conda init # initialize conda
274239
conda activate atomsci-env # activate atomsci-env environment
275-
pip install pip --upgrade
276240

277-
sudo apt update
278241
sudo apt install git # install git to Linux terminal
279-
sudo apt update
280242
git clone https://github.com/ATOMScience-org/AMPL.git # clones AMPL repository
281243

282244
cd AMPL/pip
283-
sudo apt install pkg-config
284-
sudo apt-get install libxrender1
285-
sudo apt-get install libhdf5-dev # fixes h5py errors when installing cpu_requirements.txt
286-
sudo apt-get -y install gcc # fixes gcc errors when installing cpu_requirements.txt
287-
pip install -r cpu_requirements.txt # install cpu_requirements.txt
245+
sudo apt install pkg-config lixrender1 libhdf5-dev gcc # fix h5py and gcc install errors
246+
247+
pip install pip --upgrade
248+
pip install -r mchip_requirements.txt # install mchip_requirements.txt
288249

289250
cd .. # return to AMPL parent directory
290251
./build.sh
291252
pip install -e .
292253
```
293254
---
294255
## Create jupyter notebook kernel (optional)
295-
To run AMPL from Jupyter Notebook, with your environment activated. To setup a new kernel:
256+
To run AMPL from Jupyter Notebook. To setup a new kernel, first activate your environment and then run the following command:
296257

297258
```
298259
python -m ipykernel install --user --name atomsci-env
299260
```
300-
If Jupyter Lab/Notebook is not installed in new environment
301-
```bash
302-
pip install jupyterlab
303-
python -m ipykernel install --user --name atomsci-env
304-
```
261+
305262
---
306263
## Install with Docker
307264
- Download and install Docker Desktop.
@@ -378,7 +335,7 @@ Details of running specific features are within the [parameter (options) documen
378335
AMPL can be run from the command line or by importing into Python scripts and Jupyter notebooks.
379336

380337
### Python scripts and Jupyter notebooks
381-
AMPL can be used to fit and predict molecular activities and properties by importing the appropriate modules. See the [examples](atomsci/ddm/examples/tutorials/14_BSEP_modeling.ipynb) for more descriptions on how to fit and make predictions using AMPL.
338+
AMPL can be used to fit and predict molecular activities and properties by importing the appropriate modules. See the [examples](atomsci/ddm/examples/) for more descriptions on how to fit and make predictions using AMPL.
382339

383340
### Pipeline parameters
384341
AMPL includes many parameters to run various model fitting and prediction tasks.

pip/mchip_requirements.txt

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Minimal pip requirement list for AMPL with CPU support only. This includes only the packages directly imported by AMPL code, plus a few others commonly used during development.
2+
-i https://download.pytorch.org/whl/cpu
3+
--extra-index-url https://data.dgl.ai/wheels/repo.html
4+
--extra-index-url https://pypi.python.org/simple
5+
# for LC developers: comment out pypi index url and use t$
6+
# --extra-index-url https://wci-repo.llnl.gov/repository/$
7+
8+
tensorflow==2.14.0
9+
10+
torch==2.0.1
11+
torch_geometric
12+
lightning
13+
14+
dgl==1.1.2
15+
dgllife
16+
17+
scikit-learn==1.2.2
18+
hyperopt
19+
20+
xgboost
21+
22+
bokeh
23+
matplotlib
24+
matplotlib-venn
25+
seaborn>=0.13.0
26+
umap-learn
27+
28+
pyarrow
29+
30+
bravado
31+
32+
# optional for home users: prettier images in RDKit
33+
# requires pkg-config to build: sudo apt-get pkg-config
34+
# requires Cairo: sudo apt-get install libcairo2-dev
35+
# pycairo
36+
37+
maestrowf
38+
MolVS
39+
mordred
40+
41+
pytest
42+
ipykernel
43+
notebook
44+
jupyterlab
45+
46+
deepchem==2.7.1
47+
48+
pyyaml==5.4.1

0 commit comments

Comments
 (0)