Skip to content

Commit

Permalink
Sella env fix (#711)
Browse files Browse the repository at this point in the history
Sella environment had issues installing due to the restriction of python
being 3.7 which in turn cause supporting packages required for Sella not
be installed. This then created issues for our testing
  • Loading branch information
calvinp0 authored Nov 14, 2023
2 parents d756403 + d9c2e65 commit 7f5190d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 11 deletions.
26 changes: 18 additions & 8 deletions devtools/install_sella.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,34 @@ else
exit 1
fi

# Set up Conda/Micromamba environment
if [ "$COMMAND_PKG" == "micromamba" ]; then
if [ "$COMMAND_PKG" = "micromamba" ]; then
eval "$(micromamba shell hook --shell=bash)"
micromamba activate base
BASE=$MAMBA_ROOT_PREFIX
# shellcheck source=/dev/null
source "$BASE/etc/profile.d/micromamba.sh"
# Verify if the micromamba profile script exists
if [ -f "$BASE/etc/profile.d/micromamba.sh" ]; then
. "$BASE/etc/profile.d/micromamba.sh"
else
echo "File not found: $BASE/etc/profile.d/micromamba.sh"
exit 1
fi
else
BASE=$(conda info --base)
# shellcheck source=/dev/null
source "$BASE/etc/profile.d/conda.sh"
echo "Conda base directory: $BASE"
# Verify if the conda profile script exists
if [ -f "$BASE/etc/profile.d/conda.sh" ]; then
. "$BASE/etc/profile.d/conda.sh"
else
echo "File not found: $BASE/etc/profile.d/conda.sh"
exit 1
fi
fi

# clone the repo in the parent directory
echo "Creating the Sella environment..."
$COMMAND_PKG env create -f devtools/sella_environment.yml
# Activate the environment
if [ "$COMMAND_PKG" == "micromamba" ]; then
if [ "$COMMAND_PKG" = "micromamba" ]; then
micromamba activate sella_env
else
conda activate sella_env
Expand All @@ -53,5 +63,5 @@ echo 'export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:'"$BASE"'/envs/sella_env/lib' >>
echo 'export LD_LIBRARY_PATH=${OLD_LD_LIBRARY_PATH}' >> $BASE/envs/sella_env/etc/conda/deactivate.d/env_vars.sh
echo 'unset OLD_LD_LIBRARY_PATH' >> $BASE/envs/sella_env/etc/conda/deactivate.d/env_vars.sh

source ~/.bashrc
. ~/.bashrc
echo "Done installing Sella."
6 changes: 3 additions & 3 deletions devtools/sella_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: sella_env
channels:
- conda-forge
dependencies:
- python=3.7
- python>=3.8
- xtb-python
- pyyaml
- pandas
- ncurses
- pip:
- sella==2.2.1

- sella
- typing-extensions

0 comments on commit 7f5190d

Please sign in to comment.