CREDIT: CTD
For people on Linux who want to use this mod, here is a quick ( hehe ..) guide (no promises it will work, you might need to adjust some things...)
You will need docker installed on the pc where you want to run the DwemerDistro (it can be a different pc than the one you are gaming on, or the one you are gaming on (I am using a separate older laptop with 4c/8t 9th gen intel CPU and NVidia GTX 1650 to provide XTTS , openrouter provides LLM, I am not using STT so no idea if this part works )
PLEASE FILL linux_user variable, my user is ctd, please switch it to yours, if you do not know your username simply run "whoami" in terminal
#!/usr/bin/env bash
#run as root (sudo ...)
if [[ $(whoami) != "root" ]]
then
echo "[ERROR] Run this script as root (sudo $0)"
exit 1
fi
linux_user="ctd"
wsl_tar_image_path="/home/${linux_user}/docker_build/DwemerAI4Skyrim3.tar"
sudo docker image list|grep -q skyrimai
if [[ ${?} -ne 0 ]]
then
echo "[INFO] Creating docker image ..."
docker image import ${wsl_tar_image_path} skyrimai:latest
else
echo "[INFO] Docker image already exists, ok"
fi
if [[ ! -d "/home/${linux_user}/docker_env/skyrimai_postgres" ]]
then
echo "[INFO] Preparing skyrimai_postgres"
mkdir -p /home/${linux_user}/docker_env/skyrimai_postgres
cd /home/${linux_user}/docker_env/skyrimai_postgres
tar -xvf ${wsl_tar_image_path} ./var/lib/postgresql/15 --strip-components=4
chown 107:116 -R /home/${linux_user}/docker_env/skyrimai_postgres
chmod 750 -R /home/${linux_user}/docker_env/skyrimai_postgres
fi
if [[ ! -d "/home/${linux_user}/docker_env/skyrimai_tmp" ]]
then
echo "[INFO] Preparing skyrimai_tmp"
mkdir -p /home/${linux_user}/docker_env/skyrimai_tmp
chmod 777 /home/${linux_user}/docker_env/skyrimai_tmp
fi
if [[ ! -d "/home/${linux_user}/docker_env/skyrimai_dwemerhome" ]]
then
echo "[INFO] Preparing skyrimai_dwemerhome"
mkdir -p /home/${linux_user}/docker_env/skyrimai_dwemerhome
chown 1000:1000 -R /home/${linux_user}/docker_env/skyrimai_dwemerhome
cd /home/${linux_user}/docker_env/skyrimai_dwemerhome
tar -xvf ${wsl_tar_image_path} ./home/dwemer/ --strip-components=3
fi
if [[ ! -d "/home/${linux_user}/docker_env/skyrimai_www" ]]
then
echo "[INFO] Preparing skyrimai_www"
mkdir -p /home/${linux_user}/docker_env/skyrimai_www
chown 1000:1000 -R /home/${linux_user}/docker_env/skyrimai_www
cd /home/${linux_user}/docker_env/skyrimai_www
tar -xvf ${wsl_tar_image_path} ./var/www/html --strip-components=4
fi
echo "[INFO] Creating docker service \"skyrimaiframework\""
sudo docker system info|grep -i runtimes|grep -iq nvidia
if [[ ${?} -eq 0 ]]
then
nvidia_runtime_installed="yes"
else
nvidia_runtime_installed="no"
fi
echo "[INFO] NVIDIA docker runtime installed: ${nvidia_runtime_installed}"
nvidia_gpu_id=$(nvidia-smi -L 2>/dev/null|grep -oP "(?<=UUID: ).*(?=\))")
if [[ ! -z ${nvidia_gpu_id} ]]
then
echo "[INFO] NVIDIA GPU detected: yes"
else
echo "[INFO] NVIDIA GPU detected: no"
fi
sudo docker ps -a|grep -iq skyrimaiframework
if [[ ${?} -eq 0 ]]
then
echo "[ERROR] There already exists skyrimaiframework service. If you want to recreate the service, first remove the old one(sudo docker container stop skyrimaiframework && sudo docker container remove skyrimaiframework) and then rerun this script"
exit 1
fi
if [[ ! -z ${nvidia_gpu_id} && ${nvidia_runtime_installed} = "yes" ]]
then
echo "[INFO] Installing docker service with nvidia support"
sudo docker run -d \
--name=skyrimaiframework \
--runtime=nvidia \
--gpus device=${nvidia_gpu_id} \
-p 8081:8081 \
-p 8082:8082 \
-p 8083:8083 \
-p 59125:59125 \
-p 9876:9876 \
-p 8020:8020 \
-p 8007:8007 \
-v /home/${linux_user}/docker_env/skyrimai_postgres:/var/lib/postgresql \
-v /home/${linux_user}/docker_env/skyrimai_tmp:/tmp \
-v /home/${linux_user}/docker_env/skyrimai_dwemerhome:/home/dwemer \
-v /home/${linux_user}/docker_env/skyrimai_www:/var/www/html \
--restart unless-stopped \
skyrimai:latest \
sh -c "sed -i '148,158d' /etc/start_env && echo 'tail -f /dev/null' >> /etc/start_env && /etc/start_env"
else
echo "[INFO] Installing docker service without nvidia support"
sudo docker run -d \
--name=skyrimaiframework \
-p 8081:8081 \
-p 8082:8082 \
-p 8083:8083 \
-p 59125:59125 \
-p 9876:9876 \
-p 8020:8020 \
-p 8007:8007 \
-v /home/${linux_user}/docker_env/skyrimai_postgres:/var/lib/postgresql \
-v /home/${linux_user}/docker_env/skyrimai_tmp:/tmp \
-v /home/${linux_user}/docker_env/skyrimai_dwemerhome:/home/dwemer \
-v /home/${linux_user}/docker_env/skyrimai_www:/var/www/html \
--restart unless-stopped \
skyrimai:latest \
sh -c "sed -i '148,158d' /etc/start_env && echo 'tail -f /dev/null' >> /etc/start_env && /etc/start_env"
fi
This should create a working container with essential parts persisted as volumes.
If you have NVidia gpu and runtime installed the output will show:
"[INFO] Installing docker service with nvidia support"
otherwise
"[INFO] Installing docker service without nvidia support"
Confirm if the container is running with command
sudo docker ps|grep -i skyrimaiframework
If you see any output you should be good
Now you need to enter the container and run a few scripts
To enter the container issue this command:
container_id=$(sudo docker ps -a|grep "skyrimaiframework"|cut -f1 -d" ");sudo docker exec -ti ${container_id} /bin/bash
You should be logged in as root
Switch to user dwemer
su dwemer
Then you will have to run scripts (this is the same as running .bat files from the official instruction)
1. Update git repo
/usr/local/bin/update_gws
2.Install minime service
/home/dwemer/minime-t5/ddistro_install.sh
At the end choose option with cpu
3.Install mimic or xtts (or both)
/home/dwemer/mimic3/ddistro_install.sh
At the end choose default
/home/dwemer/xtts-api-server/ddistro_install.sh
At the end choose default, or gpu if you installed the nvidia gpu version
Then you need to enter your PCs local IP in the config file for the plugin
E.G. My main laptop has an IP of 192.168.1.51, while the spare laptop with DwemerDistro has an IP of 192.168.1.101
My AIAgent.ini file looks like this:
SERVER=192.168.1.101
PORT=8081
PATH=/HerikaServer/comm.php
POLINT=1
I have the interface for configuration available at http://192.168.1.101:8081