forked from SiVeGCS/dask_template
25 lines
545 B
Bash
25 lines
545 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Display usage
|
||
|
if [ "$#" -ne 1 ]; then
|
||
|
echo "Usage: $0 <conda_environment_name>"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
# Name of the Conda environment
|
||
|
CONDA_ENV_NAME=$1
|
||
|
|
||
|
# Check if the Conda environment already exists
|
||
|
if conda env list | grep -q "$CONDA_ENV_NAME"; then
|
||
|
|
||
|
echo "Environment '$CONDA_ENV_NAME' already exists."
|
||
|
|
||
|
else
|
||
|
|
||
|
echo "Environment '$CONDA_ENV_NAME' does not exist, creating it."
|
||
|
|
||
|
# Create Conda environment
|
||
|
conda env create --name $CONDA_ENV_NAME -f environment.yaml
|
||
|
|
||
|
echo "Conda environment '$CONDA_ENV_NAME' created."
|
||
|
fi
|