Closed tilllt closed 1 week ago
I may be wrong but I know I've had issues trying to mount a folder directly inside the working directory with docker, so you may be better off setting it to /cache and then setting the environment variable
I found a workaround.. the folders don't have the correct permissions on them.. just have to chmod them to give the group write permissions
This docker config is complete trash. how do I change the host it listens on. By default it listens on 127.0.0.1. I want it to listen on 0.0.0.0
I would guess you change container port in the .env file
@joshs85, I also found that chmod on the folders helped.
I encountered a follow-up issue where my browser would not load the web UI (connection keeps getting "reset" while loading). If you're impatient like me, you can add network_mode: host
to your docker compose file and restart your container as a temporary workaround.
Disclaimer: To anyone that tries this workaround, please check the Docker docs so you know exactly what you're changing: Host network driver
I encountered a follow-up issue where my browser would not load the web UI (connection keeps getting "reset" while loading). If you're impatient like me, you can add
network_mode: host
to your docker compose file and restart your container as a temporary workaround.
Dam that's annoying, haven't had that issue with mine but I use a different set up
I also had the problem, some directories had user 1000 as owner. I didnt edit this section in the .env :
# override default app build permissions (handy for deploying to cloud)
#APP_GID=6972
#APP_UID=6972
is it due to that line in the docker-compose.yml which does not have a colon for the the APP_UID:
APP_GID: ${APP_GID:-6972}
APP_UID: ${APP_UID-6972}
This docker config is complete trash. how do I change the host it listens on. By default it listens on 127.0.0.1. I want it to listen on 0.0.0.0
You modify CMD_FLAGS.txt and add --listen and --listen-host 0.0.0.0
For anyone stumbling on this weird issue:
Run these commands ON THE HOST SIDE (where you ran your initial git clone):
$ sudo chown -R 6972:6972 ./cache
$ sudo chmod -R 775 ./cache
I spent way too much time trying to change permissions inside the container when the issue was outside of it.
I also recommend to comment the .env file like this:
# Set cache env
#TRANSFORMERS_CACHE=/home/app/text-generation-webui/cache/
HF_HOME=/home/app/text-generation-webui/cache/
To get rid of these annoying warnings:
FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
EDIT :
I also had to do it for logs and models folders:
$ sudo chown -R 6972:6972 ./models
$ sudo chmod -R 775 ./models
$ sudo chown -R 6972:6972 ./logs
$ sudo chmod -R 775 ./logs
@louispaulet thank you! this fix is what I needed to get up and running. @sergepetit adding the missing ':' in docker-compose.yml by itself didn't fix the problem even rebuilding from scratch. it took chmod + chown the affected folders to solve it.
Thanks, louispaulet for the answers.
If it helps anyone else, I had a different APP_RUNTIME_GID
in the .env
file since I'd followed the step:
# You can find your current host user group id with the command `id -g`
However, changing the owner and permissions on the following folders also worked for me. Keeping the default ID:
$ sudo chown -R 6972:6972 ./cache
$ sudo chmod -R 775 ./cache
$ sudo chown -R 6972:6972 ./models
$ sudo chmod -R 775 ./models
$ sudo chown -R 6972:6972 ./logs
$ sudo chmod -R 775 ./logs
This issue has been closed due to inactivity for 6 months. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.
Describe the bug
I am getting this error:
There was a problem when trying to write in your cache folder (/home/app/text-generation-webui/.cache/huggingface/hub). You should set the environment variable TRANSFORMERS_CACHE to a writable directory.
The bind mount in the docker-compose.yml has
Is there an existing issue for this?
Reproduction
clone repo follow instructions how to start via docker
Screenshot
No response
Logs
System Info