Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ENVNAME=$1
- # Directory that contains the venvs
- PYV_ROOT=${HOME}
- ENV_ROOT="${PYV_ROOT}/.pyv/${ENVNAME}/bin"
- # Check the number of arguments
- if [ "$#" -eq 1 ] && [ -d "${ENV_ROOT}" ]; then
- echo "Activating ${1}"
- export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
- export OLD_PATH=$PATH
- export OLD_PS1="$PS1"
- export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
- export PATH=${PYV_ROOT}/.pyv/${ENVNAME}/bin:/usr/local/cuda/bin:$PATH
- export PS1="(${ENVNAME})$PS1"
- else
- echo "Please put the environment name as argument, you put ${1}" >&2
- fi
Add Comment
Please, Sign In to add comment