Skip to content

Instantly share code, notes, and snippets.

@BBischof
Created January 1, 2018 03:29
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 BBischof/84d324a5c8da1fe127cd48f255b545ac to your computer and use it in GitHub Desktop.
Save BBischof/84d324a5c8da1fe127cd48f255b545ac to your computer and use it in GitHub Desktop.
create a kernel from a pip_reqs
experiment_name=$1
pip_reqs_file=$2
mkdir $experiment_name
cd $experiment_name
cp $pip_reqs_file .
venv_name="venv_"$experiment_name
virtualenv -p python $venv_name
source $venv_name/bin/activate
pip install -r ../$pip_reqs_file
pip install ipykernel
python -m ipykernel install --user --name=$venv_name
deactivate
pip install -r ../$pip_reqs_file
pip install ipykernel
python -m ipykernel install --user --name=$venv_name
deactivate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment