Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 42 additions & 4 deletions doc/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [Easy installation methods](#easy-installation-methods)
- [Install from source code](#install-from-source-code)
- [Install i-PI](#install-i-pi)
- [Building conda packages](#building-conda-packages)

## Easy installation methods

Expand All @@ -18,17 +19,33 @@ After your easy installation, DeePMD-kit (`dp`) and LAMMPS (`lmp`) will be avail
### Install off-line packages
Both CPU and GPU version offline packages are avaiable in [the Releases page](https://github.com/deepmodeling/deepmd-kit/releases).

Some packages are splited into two files due to size limit of GitHub. One may merge them into one after downloading:
```bash
cat deepmd-kit-2.0.0-cuda11.1_gpu-Linux-x86_64.sh.0 deepmd-kit-2.0.0-cuda11.1_gpu-Linux-x86_64.sh.1 > deepmd-kit-2.0.0-cuda11.1_gpu-Linux-x86_64.sh
```

### Install with conda
DeePMD-kit is avaiable with [conda](https://github.com/conda/conda). Install [Anaconda](https://www.anaconda.com/distribution/#download-section) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) first.

To install the CPU version:
One may create an environment that contains the CPU version of DeePMD-kit and LAMMPS:
```bash
conda create -n deepmd deepmd-kit=*=*cpu lammps-dp=*=*cpu -c https://conda.deepmodeling.org
```

Or one may want to create a GPU environment containing [CUDA Toolkit](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver):
```bash
conda install deepmd-kit=*=*cpu lammps-dp=*=*cpu -c deepmodeling
conda create -n deepmd deepmd-kit=*=*gpu lammps-dp=*=*gpu cudatoolkit=11.1 -c https://conda.deepmodeling.org -c nvidia
```
One could change the CUDA Toolkit version from `11.1` to `10.1` or `10.0`.

To install the GPU version containing [CUDA 10.1](https://docs.nvidia.com/deploy/cuda-compatibility/index.html#binary-compatibility__table-toolkit-driver):
One may speficy the DeePMD-kit version such as `2.0.0` using
```bash
conda install deepmd-kit=*=*gpu lammps-dp=*=*gpu -c deepmodeling
conda create -n deepmd deepmd-kit=2.0.0=*cpu lammps-dp=2.0.0=*cpu -c https://conda.deepmodeling.org
```

One may enable the environment using
```bash
conda activate deepmd
```

### Install with docker
Expand Down Expand Up @@ -249,3 +266,24 @@ Test with Pytest:
pip install pytest
pytest --pyargs ipi.tests
```

## Building conda packages

One may want to keep both convenience and personalization of the DeePMD-kit. To achieve this goal, one can consider builing conda packages. We provide building scripts in [deepmd-kit-recipes organization](https://github.com/deepmd-kit-recipes/). These building tools are driven by [conda-build](https://github.com/conda/conda-build) and [conda-smithy](https://github.com/conda-forge/conda-smithy).

For example, if one wants to turn on `MPIIO` package in LAMMPS, go to [`lammps-dp-feedstock`](https://github.com/deepmd-kit-recipes/lammps-dp-feedstock/) repository and modify `recipe/build.sh`. `-D PKG_MPIIO=OFF` should be changed to `-D PKG_MPIIO=ON`. Then go to the main directory and executing

```sh
./build-locally.py
```

This requires the Docker has been installed. After the building, the packages will be generated in `build_artifacts/linux-64` and `build_artifacts/noarch`, and then one can install then execuating
```sh
conda create -n deepmd lammps-dp -c file:///path/to/build_artifacts -c https://conda.deepmodeling.org -c nvidia
```

One may also upload packages to one's Anaconda channel, so they can be installed on other machines:

```sh
anaconda upload /path/to/build_artifacts/linux-64/*.tar.bz2 /path/to/build_artifacts/noarch/*.tar.bz2
```