Skip to content

Commit e4fd81e

Browse files
committed
Update installer.sh
1 parent 9291244 commit e4fd81e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

installer.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ BRANCH="" # -b
6060
URL="" # -u
6161
REPO='https://github.com/RecursionSpace/OpenPod'
6262

63+
PYTHON_VERSION='3.11'
64+
VENV_DIR='/opt/OpenPod/venv'
65+
PYTHON_PATH="$VENV_DIR/bin/python"
6366
# ---------------------------------------------------------------------------- #
6467
# Options #
6568
# ---------------------------------------------------------------------------- #
@@ -173,7 +176,7 @@ if ! python3.11 --version &>/dev/null; then
173176
echo "Installing Python 3.11..."
174177
add-apt-repository ppa:deadsnakes/ppa -y
175178
apt-get update -y
176-
apt-get install -y python3.11 python3.11-dev python3.11-venv
179+
apt-get install -y python${PYTHON_VERSION} python${PYTHON_VERSION}-dev python${PYTHON_VERSION}-venv
177180
else
178181
echo "Python 3.11 is already installed."
179182
# still ensure dev and venv
@@ -199,9 +202,9 @@ git clone --single-branch --branch $BRANCH "${REPO}".git
199202
cd OpenPod
200203

201204
# ----------------------------- Setup Environment ---------------------------- #
202-
python3.11 -m venv /opt/OpenPod/env
203-
source /opt/OpenPod/env/bin/activate
204-
pip install --no-input -U -r /opt/OpenPod/requirements.txt
205+
$PYTHON_PATH -m venv /opt/OpenPod/venv
206+
$PYTHON_PATH -m pip install --upgrade pip
207+
$PYTHON_PATH -m pip install --no-input -U -r /opt/OpenPod/requirements.txt
205208

206209
# ---------------------------- Create Directories ---------------------------- #
207210
mkdir -p /opt/OpenPod/logs

0 commit comments

Comments
 (0)