diff --git a/README.md b/README.md index 600ae32..d81e969 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,9 @@ #### 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 - [ ] Configure GNOME extensions with cli tool. - [ ] 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 diff --git a/configs/ollama/gibai.service b/configs/ollama/gibai.service new file mode 100644 index 0000000..81b6860 --- /dev/null +++ b/configs/ollama/gibai.service @@ -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 diff --git a/configs/stable_diffusion/stable_diffusion.service b/configs/stable_diffusion/stable_diffusion.service new file mode 100644 index 0000000..90c110c --- /dev/null +++ b/configs/stable_diffusion/stable_diffusion.service @@ -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 + diff --git a/configs/stable_diffusion/webui-user.sh b/configs/stable_diffusion/webui-user.sh new file mode 100755 index 0000000..659ffee --- /dev/null +++ b/configs/stable_diffusion/webui-user.sh @@ -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" + +########################################### diff --git a/configs/sunshine/sunshine.service b/configs/sunshine/sunshine.service new file mode 100644 index 0000000..f10fb6e --- /dev/null +++ b/configs/sunshine/sunshine.service @@ -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 diff --git a/install/app_jdk22.sh b/install/app_jdk22.sh new file mode 100644 index 0000000..1f5db8d --- /dev/null +++ b/install/app_jdk22.sh @@ -0,0 +1 @@ +sudo dnf install -y https://download.oracle.com/java/22/latest/jdk-22_linux-aarch64_bin.rpm diff --git a/install/app_jetbrains_toolbox.sh b/install/app_jetbrains_toolbox.sh new file mode 100644 index 0000000..357b7fe --- /dev/null +++ b/install/app_jetbrains_toolbox.sh @@ -0,0 +1 @@ +xdg-open https://www.jetbrains.com/toolbox-app/download/download-thanks.html?platform=linux diff --git a/install/app_slack .sh b/install/app_slack.sh similarity index 100% rename from install/app_slack .sh rename to install/app_slack.sh diff --git a/install/app_torbrowser-launcher.sh b/install/app_tor_browser.sh similarity index 100% rename from install/app_torbrowser-launcher.sh rename to install/app_tor_browser.sh diff --git a/install/app_upscayl.sh b/install/app_upscayl.sh new file mode 100644 index 0000000..2011b82 --- /dev/null +++ b/install/app_upscayl.sh @@ -0,0 +1 @@ +sudo dnf install -y https://github.com/upscayl/upscayl/releases/download/v2.11.5/upscayl-2.11.5-linux.rpm diff --git a/scripts/install/app_resolve.sh b/install/optional/app_resolve.sh similarity index 100% rename from scripts/install/app_resolve.sh rename to install/optional/app_resolve.sh diff --git a/install/optional/service_ollama.sh b/install/optional/service_ollama.sh new file mode 100644 index 0000000..467699e --- /dev/null +++ b/install/optional/service_ollama.sh @@ -0,0 +1,3 @@ +curl -fsSL https://ollama.com/install.sh | sh + +sudo systemctl enable --now gibai.service diff --git a/install/optional/service_stable_diffusion.sh b/install/optional/service_stable_diffusion.sh new file mode 100644 index 0000000..f7d1628 --- /dev/null +++ b/install/optional/service_stable_diffusion.sh @@ -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" diff --git a/sources/install/tools b/sources/install/tools index 68efeaa..e073b2d 100644 --- a/sources/install/tools +++ b/sources/install/tools @@ -111,3 +111,4 @@ autoconf bison ImageMagick sqlite3 +gperftools-libs