Revisions
-
ruxi created this gist
Jul 21, 2016 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ %%writefile make_conda_env.sh #!/usr/bin/env bash # author: github.com/ruxi # reproducibly create conda env read -p "Create new conda env (y/n)?" CONT if [ "$CONT" == "n" ]; then echo "exit"; else # user chooses to create conda env # prompt user for conda env name echo "Creating new conda environment, choose name" read input_variable echo "Name $input_variable was chosen"; # Create environment.yml or not read -p "Create 'enviroment.yml', will overwrite if exist (y/n)?" if [ "$CONT" == "y" ]; then # yes: create enviroment.yml echo "# BASH: conda env create # source activate phd name: $input_variable dependencies: - python=3 - jupyter - notebook - numpy - rpy2 - pandas - scipy - numpy - scikit-learn - seaborn - pip: - plotly">environment.yml #list name of packages conda env create else echo "installing base packages" conda create --name $input_variable\ python=3 jupyter notebook numpy rpy2\ pandas scipy numpy scikit-learn seaborn fi echo "to exit: source deactivate" fi