-
-
Save trcook/558bd8d012c9fad9f44bf0705f5bec05 to your computer and use it in GitHub Desktop.
ooba docker config stuff
This file contains hidden or 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
TORCH_CUDA_ARCH_LIST=8.6 | |
HOST_API_PORT=3389 | |
HOST_PORT=8888 | |
CONTAINER_PORT=7860 | |
CONTAINER_API_PORT=5000 | |
BUILD_EXTENSIONS="" | |
TRANSFORMERS_CACHE=/home/app/text-generation-webui/cache/ | |
HF_HOME=/home/app/text-generation-webui/cache/ | |
COMPOSE_PROJECT_NAME=trc #name for container will be trc_{service} |
This file contains hidden or 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
version: "3.3" | |
services: | |
text-generation-webui: | |
build: | |
context: . | |
args: | |
TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST:-7.5} | |
BUILD_EXTENSIONS: ${BUILD_EXTENSIONS:-} | |
image: trcook/oobabooga | |
env_file: .env | |
command: /bin/sh -c 'export HOME=/home/app/text-generation-webui && ./start_linux.sh --listen --api --listen-port 7860 --api-port 5000' | |
ports: | |
- "${HOST_PORT:-7860}:${CONTAINER_PORT:-7860}" | |
- "${HOST_API_PORT:-5000}:${CONTAINER_API_PORT:-5000}" | |
stdin_open: true | |
tty: true | |
volumes: | |
- ./cache:/home/app/text-generation-webui/cache:z | |
- ./characters:/home/app/text-generation-webui/characters:z | |
- ./extensions:/home/app/text-generation-webui/extensions:z | |
- ./loras:/home/app/text-generation-webui/loras:z | |
- ./logs:/home/app/text-generation-webui/logs:z | |
- ./models:/home/app/text-generation-webui/models:z | |
- ./presets:/home/app/text-generation-webui/presets:z | |
- ./prompts:/home/app/text-generation-webui/prompts:z | |
- ./softprompts:/home/app/text-generation-webui/softprompts:z | |
- ./training:/home/app/text-generation-webui/training:z | |
- ./cloudflared:/etc/cloudflared:z | |
deploy: | |
resources: | |
reservations: | |
devices: | |
- driver: nvidia | |
count: all | |
capabilities: [gpu] |
This file contains hidden or 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
FROM ubuntu:22.04 | |
WORKDIR /builder | |
ARG TORCH_CUDA_ARCH_LIST="${TORCH_CUDA_ARCH_LIST:-3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX}" | |
ARG BUILD_EXTENSIONS="${BUILD_EXTENSIONS:-}" | |
ARG APP_UID="${APP_UID:-6972}" | |
ARG APP_GID="${APP_GID:-6972}" | |
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,rw \ | |
apt update && \ | |
apt install --no-install-recommends -y git vim build-essential python3-dev pip bash curl && \ | |
rm -rf /var/lib/apt/lists/* | |
WORKDIR /home/app/ | |
RUN git clone https://github.com/oobabooga/text-generation-webui.git | |
WORKDIR /home/app/text-generation-webui | |
RUN GPU_CHOICE=A USE_CUDA118=FALSE LAUNCH_AFTER_INSTALL=FALSE INSTALL_EXTENSIONS=TRUE ./start_linux.sh --verbose | |
COPY CMD_FLAGS.txt /home/app/text-generation-webui/ | |
EXPOSE ${CONTAINER_PORT:-7860} ${CONTAINER_API_PORT:-5000} ${CONTAINER_API_STREAM_PORT:-5005} | |
WORKDIR /home/app/text-generation-webui | |
CMD umask 0002 && export HOME=/home/app/text-generation-webui && ./start_linux.sh --listen --api |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment