Skip to content

Instantly share code, notes, and snippets.

@mrseanryan
Last active January 31, 2024 12:01
Show Gist options
  • Save mrseanryan/f1f572f8a16c0dd37741bdb232bb4c61 to your computer and use it in GitHub Desktop.
Save mrseanryan/f1f572f8a16c0dd37741bdb232bb4c61 to your computer and use it in GitHub Desktop.
Basic NON interactive install of text-generation-webui to host LLM on Ubuntu - for 24GB GPU such as AWS EC2 G4 or G5 box
#!/bin/bash
# Basic NON interactive install of text-generation-webui to host LLM on Ubuntu
GPU_GB=${1:-24}
#sudo apt update
#sudo apt install python3-pip
git clone https://github.com/oobabooga/text-generation-webui.git
pushd text-generation-webui
echo "=== === installing text-generation-webui"
# Do NOT launch after install, since this is a non-interactive install
GPU_CHOICE=A USE_CUDA118=FALSE LAUNCH_AFTER_INSTALL=FALSE INSTALL_EXTENSIONS=TRUE ./start_linux.sh --public-api --extensions openai --api-port 5000 --auto-devices --gpu-memory $GPU_GB
# --share
# echo "=== === Downloading an LLM ..."
# python3 download-model.py TheBloke/CodeLlama-13B-GGUF
# python3 download-model.py mistralai/Mistral-7B-v0.1
echo "=== === [done]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment