Skip to content

Instantly share code, notes, and snippets.

@vitorcalvi
Created June 8, 2024 06:51
Show Gist options
  • Save vitorcalvi/474e798f5548a4948d37f93129191919 to your computer and use it in GitHub Desktop.
Save vitorcalvi/474e798f5548a4948d37f93129191919 to your computer and use it in GitHub Desktop.
Create and activate a Conda environment named after the latest directory in ~/Desktop/webllama, then optionally install packages from requirements.txt
NAME=$(basename "$(ls -td ~/Desktop/webllama/*/ | head -1)") && conda create -n "$NAME" python=3.10 -y && conda activate "$NAME" && read -p "Install packages from requirements.txt? (yes/no): " choice && [[ "$choice" == "yes" ]] && pip install -r requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment