forked from anarchy-ai/LLM-VM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
executable file
·25 lines (23 loc) · 822 Bytes
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# check if python version is set in current dir
if [ -f ".python-version" ] ; then
if [ ! -d ".venv" ] ; then
echo "Installing virtualenv for $(python -V)"
# if we didn't install `py2venv` for python 2.x, we would need to use
# `virtualenv`, which you would have to install separately.
python -m venv .venv
fi
echo "Activating $(python -V) virtualenv"
source .venv/bin/activate
fi
# announce python version and show the path of the current python in ${PATH}
echo "Virtualenv has been activated for $(python -V)"
echo "$(which python)"
case "$(uname -s)" in
Linux*)
export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin
export PYENV_VERSION=$PYENV_VERSION-venv
;;
Darwin*)
export PATH=$PATH:$(pwd)/bin:/usr/local/bin:/usr/bin:/bin
;;
esac