Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sella env fix #711

Merged
merged 2 commits into from
Nov 14, 2023
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
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
Loading