mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-06-30 02:57:38 +00:00
more uv migs
This commit is contained in:
@ -13,15 +13,14 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
python3 \
|
||||
python3-pip
|
||||
msg_ok "Installed Dependencies"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Setting up Jupyter Notebook"
|
||||
$STD pip3 install jupyter
|
||||
msg_ok "Setup Jupyter Notebook"
|
||||
msg_info "Installing Jupyter"
|
||||
mkdir -p /opt/jupyter
|
||||
cd /opt/jupyter
|
||||
$STD uv venv .venv
|
||||
$STD .venv/bin/uv pip install jupyter
|
||||
msg_ok "Installed Jupyter"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/jupyternotebook.service
|
||||
@ -31,7 +30,7 @@ After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root
|
||||
WorkingDirectory=/opt/jupyter
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
|
||||
@ -39,6 +38,7 @@ RestartSec=10
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now jupyternotebook
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
@ -13,28 +13,27 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Setup Python 3"
|
||||
$STD apt-get install python3-pip -y
|
||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||
msg_ok "Setup Python 3"
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Setup Kometa"
|
||||
temp_file=$(mktemp)
|
||||
msg_info "Installing Kometa"
|
||||
tmp_file=$(mktemp)
|
||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Kometa-Team/Kometa/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o """$temp_file"""
|
||||
tar -xzf "$temp_file"
|
||||
mv Kometa-"${RELEASE}" /opt/kometa
|
||||
curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o "$tmp_file"
|
||||
tar -xzf "$tmp_file"
|
||||
mv "Kometa-${RELEASE}" /opt/kometa
|
||||
cd /opt/kometa
|
||||
$STD pip install -r requirements.txt --ignore-installed
|
||||
|
||||
$STD uv venv .venv
|
||||
$STD .venv/bin/uv pip install -r requirements.txt
|
||||
mkdir -p config/assets
|
||||
cp config/config.yml.template config/config.yml
|
||||
echo "${RELEASE}" >/opt/kometa_version.txt
|
||||
msg_ok "Setup Kometa"
|
||||
echo "$RELEASE" >/opt/kometa_version.txt
|
||||
msg_ok "Installed Kometa"
|
||||
|
||||
read -p "${TAB3}nter your TMDb API key: " TMDBKEY
|
||||
read -p "${TAB3}Enter your TMDb API key: " TMDBKEY
|
||||
read -p "${TAB3}Enter your Plex URL: " PLEXURL
|
||||
read -p "${TAB3}Enter your Plex token: " PLEXTOKEN
|
||||
sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL #g" /opt/kometa/config/config.yml
|
||||
sed -i -e "s#url: http://192.168.1.12:32400#url: $PLEXURL#g" /opt/kometa/config/config.yml
|
||||
sed -i -e "s/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml
|
||||
sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/g" /opt/kometa/config/config.yml
|
||||
|
||||
@ -47,21 +46,21 @@ After=network-online.target
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=/opt/kometa
|
||||
ExecStart=/usr/bin/python3 kometa.py
|
||||
ExecStart=/opt/kometa/.venv/bin/python kometa.py
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable --now -q kometa
|
||||
systemctl enable -q --now kometa
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f "$temp_file"
|
||||
rm -f "$tmp_file"
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
@ -14,29 +14,22 @@ setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
PYTHON_VERSION="3.12" setup_uv
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y \
|
||||
git \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libtiff-dev \
|
||||
imagemagick
|
||||
git \
|
||||
libpng-dev \
|
||||
libjpeg-dev \
|
||||
libtiff-dev \
|
||||
imagemagick
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setup Python3"
|
||||
$STD apt-get install -y \
|
||||
pip \
|
||||
python3-irc
|
||||
$STD pip install jaraco.stream
|
||||
$STD pip install python-Levenshtein
|
||||
$STD pip install soupsieve
|
||||
$STD pip install pypdf
|
||||
msg_ok "Setup Python3"
|
||||
|
||||
msg_info "Installing LazyLibrarian"
|
||||
$STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian
|
||||
cd /opt/LazyLibrarian
|
||||
$STD pip install .
|
||||
$STD uv venv .venv
|
||||
$STD .venv/bin/uv pip install . jaraco.stream python-Levenshtein soupsieve pypdf
|
||||
msg_ok "Installed LazyLibrarian"
|
||||
|
||||
msg_info "Creating Service"
|
||||
@ -44,17 +37,20 @@ cat <<EOF >/etc/systemd/system/lazylibrarian.service
|
||||
[Unit]
|
||||
Description=LazyLibrarian Daemon
|
||||
After=syslog.target network.target
|
||||
|
||||
[Service]
|
||||
UMask=0002
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/python3 /opt/LazyLibrarian/LazyLibrarian.py
|
||||
WorkingDirectory=/opt/LazyLibrarian
|
||||
ExecStart=/opt/LazyLibrarian/.venv/bin/python LazyLibrarian.py
|
||||
UMask=0002
|
||||
Restart=on-failure
|
||||
TimeoutStopSec=20
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable --now -q lazylibrarian
|
||||
systemctl enable -q --now lazylibrarian
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
Reference in New Issue
Block a user