diff bin/install-k0s-web.sh @ 919:cc3b78bc4c21

install k0s.org requirements
author Jeff Hammel <k0scist@gmail.com>
date Sun, 02 Jun 2024 14:57:09 -0700
parents 9d89288e3b4c
children 531a7200649f
line wrap: on
line diff
--- a/bin/install-k0s-web.sh	Sun Jun 02 14:39:08 2024 -0700
+++ b/bin/install-k0s-web.sh	Sun Jun 02 14:57:09 2024 -0700
@@ -8,8 +8,22 @@
 DEST="${HOME}/web3"
 rm -rf "${DEST}"
 
+# Make a directory for k0s.org web
 mkdir -p "${DEST}"
 cd "${DEST}"
-pyenv install "${PYTHON_VERSION}"
+
+# Install the proper version of Python with pyenv
+# See https://github.com/pyenv/pyenv/wiki#suggested-build-environment
+pyenv install --skip-existing "${PYTHON_VERSION}"
 pyenv local "${PYTHON_VERSION}"
 python --version
+
+# Create a virtual environment
+python -m venv .
+
+# Activate the virtual environment
+. bin/activate
+
+# Install the required packages
+bin/pip install --upgrade pip
+bin/pip install -r "${HOME}"/web/requirements.txt