From 1ca5e979d2e892423b1d2d88731522f41bbd9ba1 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 25 Jun 2021 21:29:57 -0400 Subject: [PATCH 1/3] add documentation for conda fix #650, #740, #750 --- doc/install.md | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/doc/install.md b/doc/install.md index e2d7859097..3884120177 100644 --- a/doc/install.md +++ b/doc/install.md @@ -18,17 +18,28 @@ 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 ``` ### Install with docker @@ -249,3 +260,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 +``` From 0b75004b2ca73bdb61e6ebdbbec792df26939d9f Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 25 Jun 2021 21:35:59 -0400 Subject: [PATCH 2/3] add docs --- doc/install.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/install.md b/doc/install.md index 3884120177..34d7ac3347 100644 --- a/doc/install.md +++ b/doc/install.md @@ -42,6 +42,11 @@ One may speficy the DeePMD-kit version such as `2.0.0` using 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 A docker for installing the DeePMD-kit is available [here](https://github.com/orgs/deepmodeling/packages/container/package/deepmd-kit). From 9a2010c4e9a215405dfb493fc935aeb58f75fb07 Mon Sep 17 00:00:00 2001 From: Han Wang Date: Sat, 26 Jun 2021 17:42:09 +0800 Subject: [PATCH 3/3] Update install.md --- doc/install.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/install.md b/doc/install.md index 34d7ac3347..cd0c944161 100644 --- a/doc/install.md +++ b/doc/install.md @@ -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