text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

Fixed, improved, and unified Docker environment

Open WolframRavenwolf opened this issue 1 year ago • 2 comments

Checklist:

Fixed and improved Docker environment

  • Unified Dockerfile:

    • Moved GPU_CHOICE from RUN to ARG instruction so all the Dockerfiles could be unified into a single Dockerfile
    • Added CLI_ARGS to start_linux.sh command (very important fix, without it CLI_ARGS are ignored)
    • Set HOME as global instead of process-specific envvar (so it's also set when entering the container manually)
    • Removed redundant WORKDIR (we've already changed into it)
    • Deleted old Dockerfiles (now obsolete because of the unified Dockerfile)
  • Composefiles:

    • Fixed APP_UID variable default (added missing colon)
    • Added sensible container_name ("text-generation-webui" instead of default "text-generation-webui-text-generation-webui-1")
    • Added sensible hostname ("text-generation-webui" instead of random ID)
    • Added restart policy "unless-stopped" (so container can be kept running or stopped properly when starting detached)
  • Envfile-Example:

    • Added PYTORCH_KERNEL_CACHE_PATH pointing at cache dir to fix "UserWarning: Specified kernel cache directory could not be created! This disables kernel caching."
    • Added APP_RUNTIME_UID to APP_RUNTIME_GID (so you can not only define the group, but also the user for access to mounted volumes)
  • Docs:

    • Create symlinks (fixed) and missing dirs (so they won't be created by Docker as root)
  • .gitignore

    • Added .dockerignore

WolframRavenwolf avatar Feb 09 '24 20:02 WolframRavenwolf

Tested and it works for me. I can now define and use CLI_ARGS="--listen-host 0.0.0.0 --listen" as an env var set in my .env

jtara1 avatar Feb 19 '24 02:02 jtara1

Could you merge the dev branch?

oobabooga avatar Jul 20 '24 22:07 oobabooga