Last active
January 22, 2024 16:38
-
-
Save mrseanryan/6bf26b78c6af43fe38d322533c8e10b5 to your computer and use it in GitHub Desktop.
AWS EC2 script to install text-generation-webui as a Ubuntu service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
GPU_GB=${1:-24} | |
OUT_FILE=/etc/systemd/system/llmtextgen.service | |
if [ -e $OUT_FILE ] | |
then | |
echo LLM servic 'llmtextgen.service' already installed - exiting. | |
exit 0; | |
fi | |
echo Downloading script to /home/ubuntu/start-llm.sh | |
curl https://gist.githubusercontent.com/mrseanryan/2dcdb8182c05d1ea116e6bd0b772ba3d/raw > /home/ubuntu/start-llm.sh | |
sed -i "s/24/$GPU_GB/g" start-llm.sh | |
echo Downloading service definition to $OUT_FILE | |
curl https://gist.githubusercontent.com/mrseanryan/dd1e945316c1b0c4a763aa65eccd3fb8/raw > $OUT_FILE | |
echo Reloading services | |
systemctl daemon-reload | |
echo Enabling the new service | |
sudo systemctl enable llmtextgen.service | |
sudo systemctl start llmtextgen.service | |
echo Service status: | |
sudo systemctl status llmtextgen.service |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment