more uv migs
This commit is contained in:
parent
a8ddfaddf0
commit
647af55b40
@ -13,15 +13,14 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
PYTHON_VERSION="3.12" setup_uv
|
||||||
$STD apt-get install -y \
|
|
||||||
python3 \
|
|
||||||
python3-pip
|
|
||||||
msg_ok "Installed Dependencies"
|
|
||||||
|
|
||||||
msg_info "Setting up Jupyter Notebook"
|
msg_info "Installing Jupyter"
|
||||||
$STD pip3 install jupyter
|
mkdir -p /opt/jupyter
|
||||||
msg_ok "Setup Jupyter Notebook"
|
cd /opt/jupyter
|
||||||
|
$STD uv venv .venv
|
||||||
|
$STD .venv/bin/uv pip install jupyter
|
||||||
|
msg_ok "Installed Jupyter"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
cat <<EOF >/etc/systemd/system/jupyternotebook.service
|
cat <<EOF >/etc/systemd/system/jupyternotebook.service
|
||||||
@ -31,7 +30,7 @@ After=network.target
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
ExecStart=jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root
|
WorkingDirectory=/opt/jupyter
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
||||||
@ -39,6 +38,7 @@ RestartSec=10
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable -q --now jupyternotebook
|
systemctl enable -q --now jupyternotebook
|
||||||
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
@ -13,28 +13,27 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
msg_info "Setup Python 3"
|
PYTHON_VERSION="3.12" setup_uv
|
||||||
$STD apt-get install python3-pip -y
|
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
|
||||||
msg_ok "Setup Python 3"
|
|
||||||
|
|
||||||
msg_info "Setup Kometa"
|
msg_info "Installing Kometa"
|
||||||
temp_file=$(mktemp)
|
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) }')
|
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"""
|
curl -fsSL "https://github.com/Kometa-Team/Kometa/archive/refs/tags/v${RELEASE}.tar.gz" -o "$tmp_file"
|
||||||
tar -xzf "$temp_file"
|
tar -xzf "$tmp_file"
|
||||||
mv Kometa-"${RELEASE}" /opt/kometa
|
mv "Kometa-${RELEASE}" /opt/kometa
|
||||||
cd /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
|
mkdir -p config/assets
|
||||||
cp config/config.yml.template config/config.yml
|
cp config/config.yml.template config/config.yml
|
||||||
echo "${RELEASE}" >/opt/kometa_version.txt
|
echo "$RELEASE" >/opt/kometa_version.txt
|
||||||
msg_ok "Setup Kometa"
|
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 URL: " PLEXURL
|
||||||
read -p "${TAB3}Enter your Plex token: " PLEXTOKEN
|
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/token: ####################/token: $PLEXTOKEN/g" /opt/kometa/config/config.yml
|
||||||
sed -i -e "s/apikey: ################################/apikey: $TMDBKEY/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]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
WorkingDirectory=/opt/kometa
|
WorkingDirectory=/opt/kometa
|
||||||
ExecStart=/usr/bin/python3 kometa.py
|
ExecStart=/opt/kometa/.venv/bin/python kometa.py
|
||||||
Restart=always
|
Restart=always
|
||||||
RestartSec=30
|
RestartSec=30
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable --now -q kometa
|
systemctl enable -q --now kometa
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f "$temp_file"
|
rm -f "$tmp_file"
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
@ -14,6 +14,8 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
|
PYTHON_VERSION="3.12" setup_uv
|
||||||
|
|
||||||
msg_info "Installing Dependencies"
|
msg_info "Installing Dependencies"
|
||||||
$STD apt-get install -y \
|
$STD apt-get install -y \
|
||||||
git \
|
git \
|
||||||
@ -23,20 +25,11 @@ $STD apt-get install -y \
|
|||||||
imagemagick
|
imagemagick
|
||||||
msg_ok "Installed Dependencies"
|
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"
|
msg_info "Installing LazyLibrarian"
|
||||||
$STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian
|
$STD git clone https://gitlab.com/LazyLibrarian/LazyLibrarian /opt/LazyLibrarian
|
||||||
cd /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_ok "Installed LazyLibrarian"
|
||||||
|
|
||||||
msg_info "Creating Service"
|
msg_info "Creating Service"
|
||||||
@ -44,17 +37,20 @@ cat <<EOF >/etc/systemd/system/lazylibrarian.service
|
|||||||
[Unit]
|
[Unit]
|
||||||
Description=LazyLibrarian Daemon
|
Description=LazyLibrarian Daemon
|
||||||
After=syslog.target network.target
|
After=syslog.target network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
UMask=0002
|
|
||||||
Type=simple
|
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
|
TimeoutStopSec=20
|
||||||
KillMode=process
|
KillMode=process
|
||||||
Restart=on-failure
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
systemctl enable --now -q lazylibrarian
|
systemctl enable -q --now lazylibrarian
|
||||||
msg_ok "Created Service"
|
msg_ok "Created Service"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
|
Loading…
x
Reference in New Issue
Block a user