Skip to main content
oobabooga /

Text Generation Web UI

A feature-rich interface for running and experimenting with open-weight LLMs, including multiple inference backends, plugins, and tuning controls.

Chat UIsLLM InferenceFine-Tuning
Versionc19b995
Python3.11
EnvironmentPython (uv)
InterfaceWeb UI
GPURequired
Securely deploy Text Gen WebUI on Laboratory OS.
Chat with any open source LLM.

Text Generation Web UI

Laboratory OS Installation Details

Environment

Git Repohttps://github.com/oobabooga/text-generation-webui
Working Directory/workspace/text-generation-webui
Python3.11
Env Manageruv

Environment Variables

APP_DIRECTORY
/workspace/text-generation-webui
TEXT_GEN_WEB_UI_PORT
<assigned at runtime>
TEXT_GEN_API_PORT
<assigned at runtime>
APP_VERSIONWhich version of the app to use, using a git branch name or commit hash.
c19b995

Install & Run

install-and-run.sh
#!/bin/bash
set -e

export PATH="/opt/conda/bin:/root/.local/bin:$PATH"

# Clone the GitHub repository into the directory when needed
mkdir -p "/workspace/text-generation-webui"
if [ -d "/workspace/text-generation-webui/.git" ]; then
  echo "Git repository already initialized in /workspace/text-generation-webui"
elif [ -z "$(ls -A "/workspace/text-generation-webui" 2>/dev/null)" ]; then
  git clone --progress "https://github.com/oobabooga/text-generation-webui" "/workspace/text-generation-webui"
else
  echo "Working directory /workspace/text-generation-webui already exists and is not a git repository."
  echo "Leaving existing files untouched and skipping clone of https://github.com/oobabooga/text-generation-webui."
fi
  
# Change to the app directory
cd "/workspace/text-generation-webui"

# Install the requested Python version and create a virtual environment when needed
uv python install 3.11
if [ ! -d ".venv" ]; then
  uv venv --seed --python 3.11 .venv
else
  echo "Virtual environment already exists at /workspace/text-generation-webui/.venv"
fi

# Activate the virtual environment
source .venv/bin/activate


# Install PyTorch
uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu128

# Environment setup complete
echo "Environment setup complete!"

git clone https://github.com/DavG25/text-generation-webui-code_syntax_highlight $APP_DIRECTORY/extensions/code_syntax_highlight || true

export GPU_CHOICE=A
export USE_CUDA118=FALSE
export INSTALL_EXTENSIONS=TRUE

export LAUNCH_AFTER_INSTALL=FALSE

./start_linux.sh   --verbose   --subpath /text-generation-web-ui

export GPU_CHOICE=A
export USE_CUDA118=FALSE
export INSTALL_EXTENSIONS=TRUE

./start_linux.sh   --verbose   --listen   --extensions code_syntax_highlight openai   --trust-remote-code   --api   --listen-port "$TEXT_GEN_WEB_UI_PORT"   --api-port "$TEXT_GEN_API_PORT"   --subpath /text-generation-web-ui   $OPENLAB_EXTRA_ARGS