Skip to content

Commit

Permalink
Merge pull request #40 from antmicro/mglb/PreventParallelEnvModificat…
Browse files Browse the repository at this point in the history
…ions

Prevent parallel execution of `conda config`.
  • Loading branch information
mithro authored Feb 10, 2023
2 parents 33b80bd + 16cc77c commit bc9ec7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conda.mk
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ $(CONDA_ENVS_DIR): $(CONDA_PYTHON)
$(IN_CONDA_ENV_BASE) conda config --system --add envs_dirs $(CONDA_ENVS_DIR)
$(MKDIR) "$(CONDA_ENVS_DIR)"

# Parallel executions of `conda config` create race condition and can corrupt files.
.NOTPARALLEL: $(CONDA_ENV_PYTHON)

$(CONDA_ENV_PYTHON): $(ENVIRONMENT_FILE) $(REQUIREMENTS_FILE) | $(CONDA_PYTHON) $(CONDA_PKGS_DEP) $(CONDA_ENVS_DIR) $(CONDA_PYVENV)
$(IN_CONDA_ENV_BASE) conda env update --name $(CONDA_ENV_NAME) --file $(ENVIRONMENT_FILE)
$(TOUCH) "$(CONDA_ENV_PYTHON)"
Expand Down

0 comments on commit bc9ec7f

Please sign in to comment.