From 5ca4b48a063a055fe34a66d9e898d5f24acd8e94 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 15 Jun 2025 18:55:21 +0000 Subject: [PATCH] Deleted files for issue: LibreTranslate --- ct/libretranslate.sh | 61 ------------------- frontend/public/json/libretranslate.json | 44 -------------- install/libretranslate-install.sh | 76 ------------------------ 3 files changed, 181 deletions(-) delete mode 100644 ct/libretranslate.sh delete mode 100644 frontend/public/json/libretranslate.json delete mode 100644 install/libretranslate-install.sh diff --git a/ct/libretranslate.sh b/ct/libretranslate.sh deleted file mode 100644 index 5e48f535..00000000 --- a/ct/libretranslate.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env bash -source <(curl -s https://git.community-scripts.org/community-scripts/ProxmoxVED/raw/branch/main/misc/build.func) -# Copyright (c) 2021-2025 community-scripts ORG -# Author: Slaviša Arežina (tremor021) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/LibreTranslate/LibreTranslate - -APP="LibreTranslate" -var_tags="${var_tags:-Arr}" -var_cpu="${var_cpu:-2}" -var_ram="${var_ram:-2048}" -var_disk="${var_disk:-20}" -var_os="${var_os:-debian}" -var_version="${var_version:-12}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - - if [[ ! -d /opt/libretranslate ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - RELEASE=$(curl -s https://api.github.com/repos/LibreTranslate/LibreTranslate/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }') - if [[ "${RELEASE}" != "$(cat $HOME/.libretranslate)" ]] || [[ ! -f $HOME/.libretranslate ]]; then - msg_info "Stopping $APP" - systemctl stop libretranslate - msg_ok "Stopped $APP" - - msg_info "Updating $APP to ${RELEASE}" - cd /opt/libretranslate - source .venv/bin/activate - $STD pip install -U libretranslate - msg_ok "Updated $APP to ${RELEASE}" - - msg_info "Starting $APP" - systemctl start libretranslate - msg_ok "Started $APP" - - msg_ok "Update Successful" - else - msg_ok "No update required. ${APP} is already at ${RELEASE}" - 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 "${TAB}${GATEWAY}${BGN}http://${IP}:5000${CL}" diff --git a/frontend/public/json/libretranslate.json b/frontend/public/json/libretranslate.json deleted file mode 100644 index 5d90bf4b..00000000 --- a/frontend/public/json/libretranslate.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "LibreTranslate", - "slug": "libretranslate", - "categories": [ - 0 - ], - "date_created": "2025-06-13", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 5000, - "documentation": "https://github.com/LibreTranslate/LibreTranslate?tab=readme-ov-file#settings--flags", - "website": "https://libretranslate.com/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/libretranslate.webp", - "config_path": "", - "description": "Free and Open Source Machine Translation API, entirely self-hosted. Unlike other APIs, it doesn't rely on proprietary providers such as Google or Azure to perform translations. Instead, its translation engine is powered by the open source Argos Translate library.", - "install_methods": [ - { - "type": "default", - "script": "ct/libretranslate.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 20, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "During the installation, application will download language models used for translation. Depending on how fast your internet/host is, this can take 5-10 minutes.", - "type": "info" - }, - { - "text": "At every boot of LXC, application will look for updates for language models installed. This can prolong the startup of the LXC.", - "type": "info" - } - ] -} diff --git a/install/libretranslate-install.sh b/install/libretranslate-install.sh deleted file mode 100644 index febc38f1..00000000 --- a/install/libretranslate-install.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 community-scripts ORG -# Author: Slaviša Arežina (tremor021) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://github.com/LibreTranslate/LibreTranslate - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -msg_info "Installing dependencies" -$STD apt-get install -y --no-install-recommends \ - pkg-config \ - gcc \ - g++ \ - libicu-dev -msg_ok "Installed dependencies" - -msg_info "Setup Python3" -$STD apt-get install -y \ - python3-pip \ - python3-dev \ - python3-icu -msg_ok "Setup Python3" - -setup_uv -fetch_and_deploy_gh_release "libretranslate" "LibreTranslate/LibreTranslate" - -msg_info "Setup LibreTranslate (Patience)" -cd /opt/libretranslate -$STD uv venv .venv -$STD source .venv/bin/activate -$STD uv pip install --upgrade pip setuptools -$STD uv pip install Babel==2.12.1 -$STD .venv/bin/python scripts/compile_locales.py -$STD uv pip install torch==2.2.0 --extra-index-url https://download.pytorch.org/whl/cpu -$STD uv pip install "numpy<2" -$STD uv pip install . -$STD uv pip install libretranslate -$STD .venv/bin/python scripts/install_models.py -msg_ok "Installed LibreTranslate" - -msg_info "Creating Service" -cat </etc/systemd/system/libretranslate.service -[Unit] -Description=LibreTranslate -After=network.target - -[Service] -User=root -Type=idle -Restart=always -Environment="PATH=/usr/local/lib/python3.11/dist-packages/libretranslate" -ExecStart=/opt/libretranslate/.venv/bin/python3 /opt/libretranslate/.venv/bin/libretranslate --host * --update-models -ExecReload=/bin/kill -s HUP -KillMode=mixed -TimeoutStopSec=1 - -[Install] -WantedBy=multi-user.target -EOF -systemctl enable -q --now libretranslate -msg_ok "Created Service" - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt-get -y autoremove -$STD apt-get -y autoclean -msg_ok "Cleaned"