diff --git a/ct/octoprint.sh b/ct/octoprint.sh index 01a5b36bd..ac3d912c6 100644 --- a/ct/octoprint.sh +++ b/ct/octoprint.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/python_to_uv/misc/build.func) # Copyright (c) 2021-2025 tteck # Author: tteck (tteckster) # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE @@ -20,27 +20,27 @@ color catch_errors function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /opt/octoprint ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Stopping OctoPrint" - systemctl stop octoprint - msg_ok "Stopped OctoPrint" - - msg_info "Updating OctoPrint" - source /opt/octoprint/bin/activate - $STD pip3 install octoprint --upgrade - msg_ok "Updated OctoPrint" - - msg_info "Starting OctoPrint" - systemctl start octoprint - msg_ok "Started OctoPrint" - msg_ok "Updated Successfully" + header_info + check_container_storage + check_container_resources + if [[ ! -d /opt/octoprint ]]; then + msg_error "No ${APP} Installation Found!" exit + fi + msg_info "Stopping OctoPrint" + systemctl stop octoprint + msg_ok "Stopped OctoPrint" + + msg_info "Updating OctoPrint" + source /opt/octoprint/bin/activate + $STD pip3 install octoprint --upgrade + msg_ok "Updated OctoPrint" + + msg_info "Starting OctoPrint" + systemctl start octoprint + msg_ok "Started OctoPrint" + msg_ok "Updated Successfully" + exit } start @@ -50,4 +50,4 @@ description msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" -echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}" \ No newline at end of file +echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}" diff --git a/install/adventurelog-install.sh b/install/adventurelog-install.sh index a56cd6949..f906b0913 100644 --- a/install/adventurelog-install.sh +++ b/install/adventurelog-install.sh @@ -23,6 +23,7 @@ $STD apt-get install -y \ python3-pip msg_ok "Installed Dependencies" +setup_uv NODE_VERSION="22" NODE_MODULE="pnpm@latest" install_node_and_modules PG_VERSION="16" PG_MODULES="postgis" install_postgresql @@ -79,11 +80,13 @@ DISABLE_REGISTRATION=False EOF cd /opt/adventurelog/backend/server mkdir -p /opt/adventurelog/backend/server/media -$STD pip install --upgrade pip -$STD pip install -r requirements.txt -$STD python3 manage.py collectstatic --noinput -$STD python3 manage.py migrate -$STD python3 manage.py download-countries +$STD uv venv /opt/adventurelog/backend/server/venv +source /opt/adventurelog/backend/server/venv/bin/activate +$STD uv pip install --upgrade pip +$STD uv pip install -r requirements.txt +$STD uv python3 manage.py collectstatic --noinput +$STD uv python3 manage.py migrate +$STD uv python3 manage.py download-countries cat </opt/adventurelog/frontend/.env PUBLIC_SERVER_URL=http://$LOCAL_IP:8000 BODY_SIZE_LIMIT=Infinity @@ -96,7 +99,7 @@ echo "${RELEASE}" >"/opt/${APPLICATION}_version.txt" msg_ok "Installed AdventureLog" msg_info "Setting up Django Admin" -$STD python3 /opt/adventurelog/backend/server/manage.py shell </etc/apt/sources.list.d/non-free.list diff --git a/install/web-check-install.sh b/install/web-check-install.sh index 6ad50f6cf..3556c381f 100644 --- a/install/web-check-install.sh +++ b/install/web-check-install.sh @@ -35,13 +35,10 @@ $STD apt-get -y install --no-install-recommends \ x11-apps msg_ok "Installed Dependencies" +setup_uv +$STD uv python install NODE_VERSION="22" NODE_MODULE="yarn@latest" install_node_and_modules -msg_info "Setup Python3" -$STD apt-get install -y python3 -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Setup Python3" - msg_info "Installing Chromium" curl -fsSL https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor -o /etc/apt/trusted.gpg.d/google-archive.gpg echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >/etc/apt/sources.list.d/google.list diff --git a/install/wger-install.sh b/install/wger-install.sh index 69eccaabd..a70f8589b 100644 --- a/install/wger-install.sh +++ b/install/wger-install.sh @@ -20,11 +20,8 @@ $STD apt-get install -y \ libapache2-mod-wsgi-py3 msg_ok "Installed Dependencies" -msg_info "Installing Python" -$STD apt-get install -y python3-pip -rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED -msg_ok "Installed Python" - +setup_uv +$STD uv python install NODE_VERSION="22" NODE_MODULE="yarn@latest,sass" install_node_and_modules msg_info "Setting up wger" @@ -42,13 +39,14 @@ curl -fsSL "https://github.com/wger-project/wger/archive/refs/tags/$RELEASE.tar. tar xzf $RELEASE.tar.gz mv wger-$RELEASE /home/wger/src cd /home/wger/src -$STD pip install -r requirements_prod.txt -$STD pip install -e . +$STD uv venv /home/wger/.venv +$STD uv pip install -r requirements_prod.txt --python=/home/wger/.venv +$STD uv pip install -e . --python=/home/wger/.venv $STD wger create-settings --database-path /home/wger/db/database.sqlite sed -i "s#home/wger/src/media#home/wger/media#g" /home/wger/src/settings.py sed -i "/MEDIA_ROOT = '\/home\/wger\/media'/a STATIC_ROOT = '/home/wger/static'" /home/wger/src/settings.py $STD wger bootstrap -$STD python3 manage.py collectstatic +$STD uv python3 manage.py collectstatic echo "${RELEASE}" >/opt/wger_version.txt msg_ok "Finished setting up wger"