huggingface / chat-ui

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

ChatUI on HuggingFace Spaces errors out with PermissionError: [Errno 13] Permission denied #511

Open Skrelan opened 1 year ago

Skrelan commented 1 year ago

When I try following the below two tutorials I hit the same error, where the container code tries to create a directory and fails due to permission issues on the host

tutorials:

  1. https://huggingface.co/docs/hub/spaces-sdks-docker-chatui#chatui-on-spaces
  2. https://huggingface.co/blog/Llama2-for-non-engineers

Note: I have set the env vars HUGGING_FACE_HUB_TOKEN and in a prior attempt HF_TOKEN as well.

Screenshot 2023-10-16 at 1 25 04 AM

stack trace on hugging face space

Traceback (most recent call last):

  File "/opt/conda/bin/text-generation-server", line 8, in <module>
    sys.exit(app())

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/cli.py", line 131, in download_weights
    utils.download_and_unload_peft(

  File "/opt/conda/lib/python3.9/site-packages/text_generation_server/utils/peft.py", line 38, in download_and_unload_peft
    os.makedirs(model_id, exist_ok=True)

  File "/opt/conda/lib/python3.9/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)

  File "/opt/conda/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)

PermissionError: [Errno 13] Permission denied: 'skrelan'
mattnull commented 12 months ago

I am also having this issue

jaasperhelin commented 11 months ago

I have the same issue. Added HUGGING_FACE_HUB_TOKEN and HF_TOKEN as secrets in my Space settings. Both tokens are READ. I built the Space anew (Factory rebuild) but still get the same error message as shown above (Errno 13).

grafik

Any solutions yet for this issue?

AalianKhan commented 10 months ago

I am having the same issue. Did you guys find any solutions?