From 5e479b878d56542be5f46e572cad6c53e0dac8d9 Mon Sep 17 00:00:00 2001 From: username Date: Mon, 2 Sep 2024 12:38:34 -0400 Subject: [PATCH] Existing vEnv --- Makefile | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index d1453d2..577b80d 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,15 @@ CONDA_RUN = conda run -n $(CONDA_ENV_NAME) all: run -create_env: - @echo "Creating conda environment $(CONDA_ENV_NAME)..." - CONDA_SUBDIR=osx-arm64 conda env create -f environment.yml +create_or_update_env: + @echo "Checking if conda environment $(CONDA_ENV_NAME) exists..." + @if conda env list | grep -q "/$(CONDA_ENV_NAME)"; then \ + echo "Updating existing conda environment $(CONDA_ENV_NAME)..."; \ + CONDA_SUBDIR=osx-arm64 conda env update -f environment.yml; \ + else \ + echo "Creating conda environment $(CONDA_ENV_NAME)..."; \ + CONDA_SUBDIR=osx-arm64 conda env create -f environment.yml; \ + fi install: create_env @echo "Installing additional dependencies..."