Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ Just copy and paste in 1s, and let it run.
curl -fsSL https://cdn.jsdmirror.com/gh/deepmodeling-activity/abacus1s/abacus1s.sh | bash
```

## Options

The installation script has several options that can be manipulated through environment variables.

- `ABACUS1S_HOME`: The location of the binary folder. (default: `$HOME/.abacus1s`)
- `ABACUS1S_NO_PATH_UPDATE`: If set the `$PATH` will not be updated to add pixi to it.
- `ABACUS_VERSION`: The version of ABACUS getting installed, can be used to up- or down-grade.
12 changes: 10 additions & 2 deletions abacus1s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ logging() {
}
logging "This script will automatically download and install ABACUS (${ABACUS_VERSION:-"lastest version"}) for you."

ABACUS1S_HOME=~/.abacus1s
ABACUS1S_HOME=${ABACUS1S_HOME:-~/.abacus1s}
export PIXI_HOME=$ABACUS1S_HOME
ABACUS1S_BIN_PATH=$ABACUS1S_HOME/bin

Expand All @@ -42,6 +42,9 @@ fi
# 2. install pixi
((progress++))
logging "Install pixi"
if [[ -v ABACUS1S_NO_PATH_UPDATE ]]; then
export PIXI_NO_PATH_UPDATE=1
fi

curl -fsSL https://pixi.sh/install.sh | sh

Expand All @@ -67,5 +70,10 @@ $ABACUS1S_BIN_PATH/mpirun --version
logging "Remove pixi to prevent conflict"
rm -f $ABACUS1S_BIN_PATH/pixi

logging "ABACUS have been installed to ${ABACUS1S_BIN_PATH}. Restart the shell to use abacus and mpirun."
if [[ -v ABACUS1S_NO_PATH_UPDATE ]]; then
logging "ABACUS have been installed to ${ABACUS1S_BIN_PATH}. To activate the environment, add the following script before your script:"
logging "export PATH=${ABACUS1S_BIN_PATH}:\$PATH"
else
logging "ABACUS have been installed to ${ABACUS1S_BIN_PATH}. Restart the shell to use abacus and mpirun."
fi