text-generation-webui
text-generation-webui copied to clipboard
Fixed, improved, and unified Docker environment
Checklist:
- [x] I have read the Contributing guidelines.
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
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
Could you merge the dev branch?