RedHatOfficial / rhelai-dev-preview

Red Hat Enterprise Linux AI -- Developer Preview
Apache License 2.0
135 stars 47 forks source link

README.md: define HF_TOKEN to download granite model #18

Closed markmc closed 3 months ago

markmc commented 3 months ago

Without this, I got:

$ ilab download --repository ibm/granite-7b-base
Downloading model from ibm/granite-7b-base@main to models...
Traceback (most recent call last):
  File "/usr/local/bin/ilab", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/instructlab/lab.py", line 800, in download
    raise ValueError(
ValueError: HF_TOKEN var needs to be set in your environment to download HF Model. 
            Alternatively, the token can be passed with --hf-token flag. 
            The HF Token is used to authenticate your identity to the Hugging Face Hub.