forked from duartegroup/mlp-train
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from requirement.txt to environment.yml (duartegroup#64)
Simplified installation scripts. * Switch from requirement.txt to environment.yml * Add separate MACE test * Use only 2 cores (available in GHA) in test_umbrella_parallel * Streamline install scripts * Update README.md Co-authored-by: Veronika Juraskova <veronika.juraskova@chem.ox.ac.uk>
- Loading branch information
1 parent
7bccf11
commit 6e822b6
Showing
14 changed files
with
220 additions
and
121 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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
# NOTE: This script should not be called on its own, | ||
# but should be sourced from other install scripts such as install_ace.sh | ||
set -euo pipefail | ||
|
||
if [[ -z ${CONDA_ENV_NAME} || -z ${CONDA_ENV_FILE} ]];then | ||
echo "ERROR: Please pass in conda environment name as the first parameter" | ||
echo "ERROR: Please pass in conda environment file as the second parameter" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -f ${CONDA_ENV_FILE} ]];then | ||
echo "ERROR: File ${CONDA_ENV_FILE} does not exist" | ||
exit 1 | ||
fi | ||
|
||
echo "* Looking for mamba or conda executable *" | ||
if which mamba; then | ||
export CONDA_EXE=mamba | ||
elif which micromamba; then | ||
export CONDA_EXE=micromamba | ||
elif which conda; then | ||
export CONDA_EXE=conda | ||
else | ||
echo "* ERROR: conda executable not found! *" | ||
exit 1 | ||
fi | ||
|
||
if [[ ${CONDA_DEFAULT_ENV-} != "gha-test-env" ]];then | ||
echo "Installing everything to a new conda environment called: $CONDA_ENV_NAME" | ||
$CONDA_EXE env create -n "${CONDA_ENV_NAME}" --file ${CONDA_ENV_FILE} | ||
else | ||
CONDA_ENV_NAME="gha-test-env" | ||
# On GitHub the environment is auto-created by setup-micromamba action | ||
echo "* Skipping conda install, we're on Github, it's already there! *" | ||
fi | ||
|
||
echo "* Installing mlptrain package in editable mode *" | ||
|
||
if [[ ${CONDA_EXE} = "mamba" ]];then | ||
# For some reason `mamba run` does not seem to work, use conda instead. | ||
CONDA_EXE=conda | ||
fi | ||
${CONDA_EXE} run -n ${CONDA_ENV_NAME} python3 -m pip install -e . |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Usage: mamba env create -n myenvname -f environment.yml | ||
--- | ||
name: mlptrain | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9 | ||
- pip | ||
- ase | ||
- autode=1.1 | ||
- coloredlogs | ||
- cython | ||
- dscribe=2.0 | ||
- matplotlib-base | ||
- numpy | ||
- pytest | ||
- py-plumed | ||
- scipy | ||
- xtb | ||
- quippy # GAP | ||
- pip: | ||
- ase@git+https://gitlab.com/ase/ase@f2615a6e9a # for PLUMED |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Usage: mamba env create -n myenvname -f environment_ace.yml | ||
--- | ||
name: mlptrain-ace | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9 | ||
- pip | ||
- ase | ||
- autode=1.1 | ||
- coloredlogs | ||
- cython | ||
- dscribe=2.0 | ||
- matplotlib-base | ||
- numpy | ||
- pytest | ||
- py-plumed | ||
- scipy | ||
- xtb | ||
- pip: | ||
- julia # Python-Julia integration (this will not install Julia itself!) | ||
- pyjulip@git+https://github.com/casv2/pyjulip.git@72280a6ac3 # Integration with ACE | ||
- ase@git+https://gitlab.com/ase/ase@f2615a6e9a # For PLUMED |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Usage: mamba env create -n myenvname -f environment_mace.yml | ||
--- | ||
name: mlptrain-mace | ||
channels: | ||
- conda-forge | ||
- pytorch | ||
dependencies: | ||
- python=3.9 | ||
- pip | ||
- ase | ||
- autode=1.1 | ||
- coloredlogs | ||
- cython | ||
- dscribe=2.0 | ||
- matplotlib-base | ||
- numpy | ||
- pytest | ||
- py-plumed | ||
- scipy | ||
- xtb | ||
# MACE dependencies | ||
- pytorch | ||
- torchvision | ||
- torchaudio | ||
- torch-ema | ||
# TODO: You might also need CUDA-specific libraries, | ||
# but that depends on CUDA version | ||
# https://pytorch.org/get-started/locally/ | ||
# - pytorch-cuda=11.8 | ||
# - pytorch-cuda=12.1 | ||
- pip: | ||
# e3nn is available on conda as well, but it is a dependency of mace | ||
# so needs to be installed together. | ||
- e3nn | ||
- mace@git+https://github.com/ACEsuit/mace@v0.2.0 | ||
- ase@git+https://gitlab.com/ase/ase@f2615a6e9a # for Plumed |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Install mlptrain together with dependencies for GAP | ||
export CONDA_ENV_NAME=mlptrain-gap | ||
export CONDA_ENV_FILE=environment.yml | ||
|
||
source create_conda_environment.sh | ||
echo "* DONE! *" |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Install mlptrain together with dependencies for MACE | ||
export CONDA_ENV_NAME=mlptrain-mace | ||
export CONDA_ENV_FILE=environment_mace.yml | ||
|
||
source create_conda_environment.sh | ||
echo "* DONE! *" |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.