-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
1,969 additions
and
2,935 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-171 KB
_images/4573c8e73858175c5271bd1ebd12882bfa3471600aa83fc45dd5af574c48ec07.png
Binary file not shown.
Binary file removed
BIN
-34.1 KB
_images/634b99a8f36448c0739fdcb81e03b4ab19762fae325e378af8456f90382832e8.png
Binary file not shown.
Binary file removed
BIN
-30.1 KB
_images/7cdc15c4dee2880c85930d34bd31b01872f3a4b87837e365259e84278dde8352.png
Binary file not shown.
Binary file added
BIN
+171 KB
_images/83bb33b74be0866e5b8e77d2cadf2ef3837b3c62d32f37036a52405a6c9b2af4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-25.9 KB
_images/8fa9a094937a45c8a90e3b5cd240df2190915defe7f6d05030c8550e130a8b9f.png
Binary file not shown.
Binary file added
BIN
+34.1 KB
_images/e8a2c285912d3dc95aa5369a634d2734f379c138e31b32706acd6ebe4138786f.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,53 @@ | ||
# Installation | ||
|
||
## pip (fast, easy to get started) | ||
|
||
Installing the OCP package and necessary dependencies is now as easy as: | ||
|
||
### GPU enabled machines | ||
``` | ||
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117 | ||
pip install pyg_lib torch_scatter torch_sparse --no-index -f https://data.pyg.org/whl/torch-1.13.1+cu117.html | ||
pip install -i https://test.pypi.org/simple/ ocp-models | ||
``` | ||
|
||
Note the `--no-index` in the second line - it seems unnecessary, but is important to make sure the versions come from that file and not the main pip index! | ||
|
||
### CPU-only install (slower training/inference!) | ||
``` | ||
pip install torch==1.13.1 torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu # install CPU torch | ||
pip install pyg_lib torch_scatter torch_sparse -f https://data.pyg.org/whl/torch-1.13.1+cpu.html | ||
pip install -i https://test.pypi.org/simple/ ocp-models | ||
``` | ||
|
||
## Conda (preferred for model training & development) | ||
|
||
- We'll use `conda` to install dependencies and set up the environment. | ||
We recommend using the [Python 3.9 Miniconda installer](https://docs.conda.io/en/latest/miniconda.html#linux-installers). | ||
- After installing `conda`, install [`mamba`](https://mamba.readthedocs.io/en/latest/) to the base environment. `mamba` is a faster, drop-in replacement for `conda`: | ||
```bash | ||
conda install mamba -n base -c conda-forge | ||
``` | ||
- Also install `conda-merge` to the base environment: | ||
```bash | ||
conda install conda-merge -n base -c conda-forge | ||
``` | ||
|
||
Next, follow the instructions for [GPU](#gpu-machines) or [CPU](#cpu-only-machines) machines depending on your hardware to create a new environment named `ocp-models` and install dependencies. | ||
|
||
### GPU machines | ||
|
||
Instructions are for PyTorch 1.13.1, CUDA 11.6 specifically. | ||
|
||
- First, check that CUDA is in your `PATH` and `LD_LIBRARY_PATH`, e.g. | ||
```bash | ||
$ echo $PATH | tr ':' '\n' | grep cuda | ||
/public/apps/cuda/11.6/bin | ||
$ echo $LD_LIBRARY_PATH | tr ':' '\n' | grep cuda | ||
/public/apps/cuda/11.6/lib64 | ||
``` | ||
The exact paths may differ on your system. | ||
- Then install the dependencies: | ||
```bash | ||
conda-merge env.common.yml env.gpu.yml > env.yml | ||
mamba env create -f env.yml | ||
``` | ||
Activate the conda environment with `conda activate ocp-models`. | ||
- Install the `ocp` package with `pip install -e .`. | ||
- Finally, install the pre-commit hooks: | ||
```bash | ||
pre-commit install | ||
``` | ||
|
||
### CPU-only machines | ||
|
||
Please skip the following if you completed the with-GPU installation from above. | ||
|
||
## conda or better yet [mamba](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) - easy | ||
|
||
We do not have official conda recipes (yet!), so install with conda or mamba you will need to clone the | ||
[ocp repo](https://github.com/Open-Catalyst-Project/ocp) and run the following from inside the repo directory to | ||
create an environment with all dependencies. | ||
|
||
1. Create an *ocp-models* environment | ||
1. **GPU** | ||
|
||
The default environment uses cuda 11.8, if you need a different version you will have to edit *pytorch-cuda* version | ||
accordingly. | ||
```bash | ||
conda create -f env.gpu.yml | ||
``` | ||
|
||
2. **CPU** | ||
```bash | ||
conda create -f env.cpu.yml | ||
``` | ||
|
||
2. Activate the environment and install `ocpmodels` | ||
```bash | ||
conda activate ocp-models | ||
pip install . | ||
``` | ||
|
||
## PyPi - flexible | ||
1. Install `pytorch` by selecting your installer, OS and CPU or CUDA version follow the official | ||
[Pytorch docs](https://pytorch.org/get-started/locally/) | ||
|
||
2. Install `torch_geometric` and the `torch_scatter`, `torch_sparse`, and `torch_cluster` optional dependencies | ||
similarly by selecting the appropriate versions in the official | ||
[PyG docs](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html) | ||
|
||
3. Install `ocpmodels` | ||
1. From test-PyPi (until we have our official release on PyPi soon!) | ||
```bash | ||
pip install -i https://test.pypi.org/simple/ ocp-models | ||
``` | ||
2. Or by cloning the repo and then using pip | ||
```bash | ||
pip install . | ||
``` | ||
|
||
|
||
## Dev install | ||
|
||
If you plan to make contributions you will need to clone the repo and install `ocp-models` with dev dependencies, | ||
```bash | ||
conda-merge env.common.yml env.cpu.yml > env.yml | ||
mamba env create -f env.yml | ||
conda activate ocp-models | ||
pip install -e . | ||
pre-commit install | ||
pip install -e .[dev] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.