Skip to content

Commit

Permalink
Update local_install_or_update
Browse files Browse the repository at this point in the history
  • Loading branch information
emprzy committed Dec 26, 2024
1 parent cbecd91 commit 8db7923
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions build/local_install_or_update
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,16 @@ if [ ! -d "$FLEPI_PATH" ]; then
exit 1
fi

# Create the conda environment if it doesn't exist
if ! conda env list | grep -q "$FLEPI_CONDA"; then
conda env create --name flepimop-env --file $FLEPI_PATH/environment.yml
fi

# Ensure that conda environment is named flepimop-env
if [ -z "${FLEPI_CONDA}" ]; then
export FLEPI_CONDA="flepimop-env"
echo "Using '$FLEPI_CONDA' for \$FLEPI_CONDA."
fi

# Activate the conda environment
conda activate $FLEPI_CONDA

# Check that the name of the FLEPI_CONDA variable matches the environment that has been set up, exit if not
FLEPI_CONDA_ENV_MATCHES=$( conda info --envs | awk '{print $1}' | grep -x "$FLEPI_CONDA" | wc -l )
if [ "$FLEPI_CONDA_ENV_MATCHES" -eq 0 ]; then
echo "Issue with conda environment: ensure you have set up your conda environment and it has the correct name."
exit 1
conda env create --name flepimop-env --file $FLEPI_PATH/environment.yml
fi

# Load the conda environment
Expand Down

0 comments on commit 8db7923

Please sign in to comment.