preload from hub with gated model

#2
by jordyvl - opened

--> RUN huggingface-cli download meta-llama/Meta-Llama-3-8B --revision=main --cache-dir=/tmp/hfcache
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py", line 261, in hf_raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/api/models/meta-llama/Meta-Llama-3-8B/revision/main

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/bin/huggingface-cli", line 8, in
sys.exit(main())
^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/commands/huggingface_cli.py", line 49, in main
service.run()
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/commands/download.py", line 156, in run
print(self._download()) # Print path to downloaded files
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/commands/download.py", line 191, in _download
return snapshot_download(
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/_snapshot_download.py", line 189, in snapshot_download
repo_info = api.repo_info(repo_id=repo_id, repo_type=repo_type, revision=revision, token=token)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/hf_api.py", line 1888, in repo_info
return method(
^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/hf_api.py", line 1698, in model_info
hf_raise_for_status(r)
File "/usr/local/lib/python3.11/site-packages/huggingface_hub/utils/_errors.py", line 277, in hf_raise_for_status
raise GatedRepoError(message, response) from e
huggingface_hub.utils._errors.GatedRepoError: 401 Client Error. (Request ID: Root=1-662267cf-159494de19cbe02132d9dd25;e433b99e-bd30-40b1-836e-5045742731cc)

Cannot access gated repo for url https://huggingface.co/api/models/meta-llama/Meta-Llama-3-8B/revision/main.
Repo model meta-llama/Meta-Llama-3-8B is gated. You must be authenticated to access it.

--> ERROR: process "/bin/sh -c huggingface-cli download meta-llama/Meta-Llama-3-8B --revision=main --cache-dir=/tmp/hfcache" did not complete successfully: exit code: 1

Sign up or log in to comment