mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-11-13 17:56:21 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5205f536e5 |
No files matched your search
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/langflow-ai/langflow
|
||||
|
||||
APP="Langflow"
|
||||
var_tags="${var_tags:-ai;llm;agents}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-8}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_admin_user="${var_admin_user:-}"
|
||||
export var_admin_pass="${var_admin_pass:-}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/langflow ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "langflow" "langflow-ai/langflow"; then
|
||||
msg_info "Stopping Langflow"
|
||||
systemctl stop langflow
|
||||
msg_ok "Stopped Langflow"
|
||||
|
||||
PYTHON_VERSION="3.14" USE_UVX="YES" setup_uv
|
||||
|
||||
msg_info "Updating Langflow"
|
||||
$STD uv venv --clear --python 3.14 /opt/langflow/.venv
|
||||
$STD uv pip install --python /opt/langflow/.venv/bin/python "langflow==${CHECK_UPDATE_RELEASE#v}"
|
||||
cat <<EOF >~/.langflow
|
||||
${CHECK_UPDATE_RELEASE#v}
|
||||
EOF
|
||||
msg_ok "Updated Langflow"
|
||||
|
||||
msg_info "Starting Langflow"
|
||||
systemctl start langflow
|
||||
msg_ok "Started Langflow"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
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 "${GATEWAY}${BGN}http://${IP}:7860${CL}"
|
||||
echo -e "${INFO}${YW}Login: LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD in /opt/langflow_data/.env (inside the container)${CL}"
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
|
||||
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/spacedriveapp/spacebot
|
||||
|
||||
APP="Spacebot"
|
||||
var_tags="${var_tags:-ai;agent;chatops}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-1024}"
|
||||
var_disk="${var_disk:-6}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_arm64="${var_arm64:-yes}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
export var_llm_base_url="${var_llm_base_url:-}"
|
||||
export var_llm_api_key="${var_llm_api_key:-}"
|
||||
export var_llm_model="${var_llm_model:-}"
|
||||
|
||||
if [[ -n "$var_llm_base_url" && -z "$var_llm_model" ]]; then
|
||||
msg_error "var_llm_model is required with var_llm_base_url."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/spacebot ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "spacebot" "spacedriveapp/spacebot"; then
|
||||
msg_info "Stopping Spacebot"
|
||||
systemctl stop spacebot
|
||||
msg_ok "Stopped Spacebot"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "spacebot" "spacedriveapp/spacebot" "prebuild" "latest" "/opt/spacebot" "spacebot-v*-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.tar.gz"
|
||||
|
||||
msg_info "Starting Spacebot"
|
||||
systemctl start spacebot
|
||||
msg_ok "Started Spacebot"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
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 "${GATEWAY}${BGN}http://${IP}:19898${CL}"
|
||||
@@ -0,0 +1,68 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/langflow-ai/langflow
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
NODE_VERSION="24" setup_nodejs
|
||||
PYTHON_VERSION="3.14" USE_UVX="YES" setup_uv
|
||||
|
||||
LANGFLOW_VERSION="${var_appversion:-$(get_latest_github_release "langflow-ai/langflow")}"
|
||||
msg_info "Installing Langflow ${LANGFLOW_VERSION#v}"
|
||||
$STD uv venv --python 3.14 /opt/langflow/.venv
|
||||
$STD uv pip install --python /opt/langflow/.venv/bin/python "langflow==${LANGFLOW_VERSION#v}"
|
||||
cat <<EOF >~/.langflow
|
||||
${LANGFLOW_VERSION#v}
|
||||
EOF
|
||||
msg_ok "Installed Langflow ${LANGFLOW_VERSION#v}"
|
||||
|
||||
msg_info "Configuring Langflow"
|
||||
mkdir -p /opt/langflow_data/logs
|
||||
cat <<EOF >/opt/langflow_data/.env
|
||||
LANGFLOW_HOST=0.0.0.0
|
||||
LANGFLOW_PORT=7860
|
||||
LANGFLOW_CONFIG_DIR=/opt/langflow_data
|
||||
LANGFLOW_DATABASE_URL=sqlite:////opt/langflow_data/langflow.db
|
||||
LANGFLOW_KNOWLEDGE_BASES_DIR=/opt/langflow_data/knowledge_bases
|
||||
LANGFLOW_LOG_FILE=/opt/langflow_data/logs/langflow.log
|
||||
LANGFLOW_SECRET_KEY=$(/opt/langflow/.venv/bin/python -c "from secrets import token_urlsafe; print(token_urlsafe(32))")
|
||||
LANGFLOW_AUTO_LOGIN=False
|
||||
LANGFLOW_SUPERUSER='${var_admin_user:-langflow}'
|
||||
LANGFLOW_SUPERUSER_PASSWORD='${var_admin_pass:-$(random_password)}'
|
||||
EOF
|
||||
chmod 600 /opt/langflow_data/.env
|
||||
msg_ok "Configured Langflow"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/langflow.service
|
||||
[Unit]
|
||||
Description=Langflow
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/langflow_data
|
||||
EnvironmentFile=/opt/langflow_data/.env
|
||||
ExecStart=/opt/langflow/.venv/bin/langflow run
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now langflow
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
@@ -1,99 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||
# Source: https://github.com/spacedriveapp/spacebot
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
bubblewrap \
|
||||
fonts-liberation \
|
||||
libnss3 \
|
||||
libatk-bridge2.0-0t64 \
|
||||
libdrm2 \
|
||||
libxcomposite1 \
|
||||
libxdamage1 \
|
||||
libxrandr2 \
|
||||
libgbm1 \
|
||||
libasound2t64 \
|
||||
libpango-1.0-0 \
|
||||
libcairo2 \
|
||||
libcups2t64 \
|
||||
libxkbcommon0 \
|
||||
libxss1 \
|
||||
libxtst6 \
|
||||
libxfixes3
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
fetch_and_deploy_gh_release "spacebot" "spacedriveapp/spacebot" "prebuild" "latest" "/opt/spacebot" "spacebot-v*-$(arch_resolve "x86_64" "aarch64")-unknown-linux-gnu.tar.gz"
|
||||
|
||||
msg_info "Configuring Spacebot"
|
||||
mkdir -p /opt/spacebot_data
|
||||
cat <<EOF >/opt/spacebot_data/.env
|
||||
SPACEBOT_DIR=/opt/spacebot_data
|
||||
EOF
|
||||
cat <<EOF >/opt/spacebot_data/config.toml
|
||||
[api]
|
||||
bind = "0.0.0.0"
|
||||
port = 19898
|
||||
|
||||
[[agents]]
|
||||
id = "main"
|
||||
default = true
|
||||
EOF
|
||||
if [[ -n "${var_llm_base_url:-}" ]]; then
|
||||
cat <<EOF >>/opt/spacebot_data/.env
|
||||
LLM_API_KEY=${var_llm_api_key:-none}
|
||||
EOF
|
||||
cat <<EOF >>/opt/spacebot_data/config.toml
|
||||
|
||||
[llm.provider.custom]
|
||||
api_type = "openai_chat_completions"
|
||||
base_url = "${var_llm_base_url%/}"
|
||||
api_key = "env:LLM_API_KEY"
|
||||
name = "OpenAI-compatible"
|
||||
|
||||
[defaults.routing]
|
||||
channel = "custom/${var_llm_model}"
|
||||
branch = "custom/${var_llm_model}"
|
||||
worker = "custom/${var_llm_model}"
|
||||
compactor = "custom/${var_llm_model}"
|
||||
cortex = "custom/${var_llm_model}"
|
||||
EOF
|
||||
fi
|
||||
chmod 600 /opt/spacebot_data/.env /opt/spacebot_data/config.toml
|
||||
msg_ok "Configured Spacebot"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/spacebot.service
|
||||
[Unit]
|
||||
Description=Spacebot
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/spacebot_data
|
||||
EnvironmentFile=/opt/spacebot_data/.env
|
||||
ExecStart=/opt/spacebot/spacebot start --foreground
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now spacebot
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
Reference in new issue
Block a user