Skip to content

Instantly share code, notes, and snippets.

@AIWintermuteAI
Created November 23, 2023 08:58
Show Gist options
  • Save AIWintermuteAI/61d733bc221875f92e66f11ceea32eb1 to your computer and use it in GitHub Desktop.
Save AIWintermuteAI/61d733bc221875f92e66f11ceea32eb1 to your computer and use it in GitHub Desktop.
For text-generation-web-ui-docker
version: "3"
services:
text-generation-webui-docker:
build:
context: .
dockerfile: Dockerfile.web
container_name: text-generation-webui
network_mode: "host"
environment:
- EXTRA_LAUNCH_ARGS="--listen --verbose --model zephyr-7b-beta.Q5_K_S.gguf --api --extensions superboogav2 web_search stable_diffusion" # Custom launch args (e.g., --model MODEL_NAME)
- BUILD_EXTENSIONS_LIVE="superboogav2 web_search stable_diffusion" # Install named extensions during every container launch. THIS WILL SIGNIFICANLTLY SLOW LAUNCH TIME.
ports:
- 7860:7860 # Default web port
- 5000:5000 # Default API port
- 5005:5005 # Default streaming port
- 5001:5001 # Default OpenAI API extension port
volumes:
- ./config/characters:/app/characters
- ./config/loras:/app/loras
- ./config/models:/app/models
- ./config/presets:/app/presets
- ./config/prompts:/app/prompts
- ./config/training:/app/training
- ./config/extensions:/app/extensions # Persist all extensions
# - ./config/extensions/silero_tts:/app/extensions/silero_tts # Persist a single extension
logging:
driver: json-file
options:
max-file: "3" # number of files or file count
max-size: '10m'
deploy:
resources:
reservations:
devices:
- driver: nvidia
device_ids: ['0']
capabilities: [gpu]
FROM atinoda/text-generation-webui:default
#install google chrome
RUN apt-get install -y wget
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
RUN apt-get -y update
RUN apt-get install -y google-chrome-stable
# install chromedriver
RUN apt-get install -yqq unzip
RUN wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/$(google-chrome --sandbox --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')/linux64/chromedriver-linux64.zip
RUN unzip -j chromedriver-linux64.zip chromedriver-linux64/chromedriver chromedriver || true
RUN mv chromedriver /usr/local/bin
RUN chmod +x /usr/local/bin/chromedriver
# set display port to avoid crash
ENV DISPLAY=:99
# install requirements for web_search
COPY config/extensions/web_search/requirements.txt /app/web_search_requirements.txt
RUN pip install -r /app/web_search_requirements.txt
# install requirements for superboogav2
COPY config/extensions/superboogav2/requirements.txt /app/superboogav2_requirements.txt
RUN pip install -r /app/superboogav2_requirements.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment