huggingface / chat-ui

Open source codebase powering the HuggingChat app
https://huggingface.co/chat
Apache License 2.0
6.88k stars 974 forks source link

ChatUI with Docker - Permissions Issue #623

Open aidansys17 opened 7 months ago

aidansys17 commented 7 months ago

I'm trying to use the ChatUI space with Docker. I have a private, custom model which I've trained. I want to access it in a private space using Docker ChatUI I seem to be running into permissions errors.

Things I've tried: Following the instructions set out here: https://huggingface.co/blog/Llama2-for-non-engineers (I used Llama2 with a custom dataset) Creating it with / without the MongoDB URI Adding an existing secret as the HF_TOKEN Creating a new "HUGGING_FACE_HUB_TOKEN" in my settings and in the new space and using that Addint he new token as a secret in the space where the model was generated Hardcoding the access token in .env.local.template to see if it gives a temp fix (it didn't) Does it matter if I don't have a centralised secret that is explicitly named as "HF_TOKEN"?

Error: huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-6576f9fe-00986ef531649f933739e793;0d286b3c-5e65-45c1-a1f9-7efea56654dd)

Error: DownloadError Repository Not Found for url: https://huggingface.co/api/models//. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (7) Failed to connect to 127.0.0.1 port 8080: Connection refused Warning: Transient problem: connection refused Will retry in 10 seconds. 59 Warning: retries left.

flexchar commented 6 months ago

Can you show the docker config?

I use docker daily it appears that either you missed the token or you're trying to access localhost OUTSIDE the container which is not the same since containers run in the isolated network.

Specifically this line is what gives me a hint curl: (7) Failed to connect to 127.0.0.1 port 8080. If I had to shoot blindly, I'd say the host should be changed to host.docker.internal to access the model running on the host machine.