Skip to content

Instantly share code, notes, and snippets.

@tbrittoborges
Created August 25, 2023 09:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbrittoborges/e6767fca318b4359daf0eb5407b9b17d to your computer and use it in GitHub Desktop.
Save tbrittoborges/e6767fca318b4359daf0eb5407b9b17d to your computer and use it in GitHub Desktop.
Saving conda envs programatically
#!/bin/bash env
conda activate
mkdir -p envs/.export
PREFIX=$(dirname "$CONDA_PREFIX")
for d in "$PREFIX"/*; do
BNAME=$(basename "$d")
echo "$BNAME"
conda env export --prefix "$d" --json > envs/.export/"$BNAME".json
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment