Add more apps & services

This commit is contained in:
Gabriel Brown 2024-06-09 15:23:26 -05:00
parent fd0fe84f3e
commit ff2ce95d17
14 changed files with 124 additions and 1 deletions

View File

@ -6,7 +6,9 @@
#### To Do: #### To Do:
- [ ] Add a way to change the font of kitty using the script - [ ] Add a way to change the font & theme of kitty using the script
- [ ] Add a themes for Neovim that are not using LazyVim - [ ] Add a themes for Neovim that are not using LazyVim
- [ ] Configure GNOME extensions with cli tool. - [ ] Configure GNOME extensions with cli tool.
- [ ] Find a consistent way to download applications not in repos. - [ ] Find a consistent way to download applications not in repos.
- [ ] Add a way to update all packages installed with git in the packages folder.
- [ ] Add a way to update all links to packages installed by link

View File

@ -0,0 +1,14 @@
[Unit]
Description=Ollama for Gib AI Website
After=network-online.target
[Service]
ExecStart=/bin/bash -lc 'OLLAMA_HOST=0.0.0.0:4242 /usr/local/bin/ollama serve'
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=/home/gib/.bun/bin:/home/gib/.bun/bin:/home/gib/.bun/bin:/home/gib/.bun/bin:/home/gib/.local/bin:/home/gib/bin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/gib/.composer/vendor/bin:/home/gib/.dotnet/tools:/home/gib/.local/share/JetBrains/Toolbox/scripts:/home/gib/.local/share/JetBrains/Toolbox/scripts:/home/gib/.local/share/JetBrains/Toolbox/scripts"
[Install]
WantedBy=default.target

View File

@ -0,0 +1,14 @@
[Unit]
Description=Stable Diffusion Web UI Service
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
WorkingDirectory=/home/gib/.local/share/sunhat/packages/stable-diffusion-webui
ExecStart=/home/gib/.local/share/sunhat/packages/stable-diffusion-webui/webui.sh
Restart=on-failure
RestartSec=30s
[Install]
WantedBy=default.target

View File

@ -0,0 +1,49 @@
#!/bin/bash
#########################################################
# Uncomment and change the variables below to your need:#
#########################################################
# Install directory without trailing slash
install_dir="/home/$(whoami)/.local/share/sunhat/packages"
# Name of the subdirectory
clone_dir="stable-diffusion-webui"
# Commandline arguments for webui.py, for example: export COMMANDLINE_ARGS="--medvram --opt-split-attention"
export COMMANDLINE_ARGS="--api --listen --medvram-sdxl --xformers"
# python3 executable
#python_cmd="python3.10"
# git executable
#export GIT="git"
# python3 venv without trailing slash (defaults to ${install_dir}/${clone_dir}/venv)
#venv_dir="venv"
# script to launch to start the app
#export LAUNCH_SCRIPT="launch.py"
# install command for torch
export TORCH_COMMAND="pip install torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113 && pip3 install -U xformers --index-url https://download.pytorch.org/whl/cu118"
#&& pip install -U xformers --index-url https://download.pytorch.org/wh1/cu121"
# Requirements file to use for stable-diffusion-webui
#export REQS_FILE="requirements_versions.txt"
# Fixed git repos
#export K_DIFFUSION_PACKAGE=""
#export GFPGAN_PACKAGE=""
# Fixed git commits
#export STABLE_DIFFUSION_COMMIT_HASH=""
#export CODEFORMER_COMMIT_HASH=""
#export BLIP_COMMIT_HASH=""
# Uncomment to enable accelerated launch
#export ACCELERATE="True"
# Uncomment to disable TCMalloc
#export NO_TCMALLOC="True"
###########################################

View File

@ -0,0 +1,12 @@
[Unit]
Description=Sunshine self-hosted game stream host for Moonlight.
StartLimitIntervalSec=500
StartLimitBurst=5
[Service]
ExecStart=/usr/bin/sunshine
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=graphical-session.target

1
install/app_jdk22.sh Normal file
View File

@ -0,0 +1 @@
sudo dnf install -y https://download.oracle.com/java/22/latest/jdk-22_linux-aarch64_bin.rpm

View File

@ -0,0 +1 @@
xdg-open https://www.jetbrains.com/toolbox-app/download/download-thanks.html?platform=linux

1
install/app_upscayl.sh Normal file
View File

@ -0,0 +1 @@
sudo dnf install -y https://github.com/upscayl/upscayl/releases/download/v2.11.5/upscayl-2.11.5-linux.rpm

View File

@ -0,0 +1,3 @@
curl -fsSL https://ollama.com/install.sh | sh
sudo systemctl enable --now gibai.service

View File

@ -0,0 +1,25 @@
# From what I remember, setting up the Python env was kinda tricky, so I'll just leave some links to
# help the next time you need to set this up. Once you do, definitely automate it.
# Repo
# https://github.com/AUTOMATIC1111/stable-diffusion-webui
# Install Instructions
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs
# Download Models
# https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable-diffusion-20
sudo dnf install -y python310
cd ~/.local/share/sunhat/packages/
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
cd stable-diffusion-webui
python3.10 -m venv venv
cp ~/.local/share/sunhat/configs/stable_diffusion/webui-user.sh ~/.local/share/sunhat/packages/stable-diffusion-webui/webui-user.sh
cp ~/.local/share/sunhat/configs/stable_diffusion/stable_diffusion.service ~/.config/systemd/user/stable_diffusion.service
curl -o ~/.local/share/sunhat/packages/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0_0.9vae.safetensors \
https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/raw/main/sd_xl_base_1.0_0.9vae.safetensors
curl -o ~/.local/share/sunhat/packages/stable-diffusion-webui/models/VAE/sdxl_vae.safetensors \
https://huggingface.co/madebyollin/sdxl-vae-fp16-fix/raw/main/sdxl_vae.safetensors
systemctl --user enable --now stable_diffusion
systemctl --user status stable_diffusion
echo "Done!"
echo "If everything went right, the Stable Diffusion service should be running, & SDXL should be installed."
echo "GitHub with Links & Instructions:"
echo "https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#stable-diffusion-20"

View File

@ -111,3 +111,4 @@ autoconf
bison bison
ImageMagick ImageMagick
sqlite3 sqlite3
gperftools-libs