- We'll use
conda
to install dependencies and set up the environment. We recommend using the Python 3.9 Miniconda installer. - After installing
conda
, installmamba
to the base environment.mamba
is a faster, drop-in replacement forconda
:conda install mamba -n base -c conda-forge
- Also install
conda-merge
to the base environment:conda install conda-merge -n base -c conda-forge
Next, follow the instructions for GPU or CPU machines depending on your hardware to create a new environment named ocp-models
and install dependencies.
Instructions are for PyTorch 1.13.1, CUDA 11.6 specifically.
- First, check that CUDA is in your
PATH
andLD_LIBRARY_PATH
, e.g.The exact paths may differ on your system.$ 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
- Then install the dependencies:
Activate the conda environment with
conda-merge env.common.yml env.gpu.yml > env.yml mamba env create -f env.yml
conda activate ocp-models
. - Install the
ocp
package withpip install -e .
. - Finally, install the pre-commit hooks:
pre-commit install
Please skip the following if you completed the with-GPU installation from above.
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