-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run docker image on any machine which haven't internet connection #1602
Comments
Hi, can you review this first? Then see what else you need. Thanks. https://github.com/h2oai/h2ogpt/blob/main/docs/README_offline.md |
I gone through the link you mention. It has all the necessary steps about offline but without docker. I'm asking about to make only one image that have one base model, config, parser etc in it that can run h2ogpt offline successfully. |
Did you follow these kinds of instructions? i.e. this env should be set:
and useful if pass to h2oGPT: |
I have been followed all the steps that you mention but it didn't work. This is my docker command with including
After running, it thrown the same error. I did also change the embedding model all-MiniLM-L6-v2 but it didn't work also. |
You need to pass the envs as a docker env like you have for the gradio port.
|
Modified command: The error i got this time:
|
Good. Now that things function, the issue is that if you are offline, you need the models in place in the cache. Because you do not, it fails. So you need to follow the offline docs for one of the ways to get those models into the cache locations. This can range from running online first and using the product, to running the smart download way. |
|
It's not related to h2oGPT at this point. Just do in python:
That is what the h2oGPT -> langchain code is doing. I presume this fails same way, and somehow you have to get that model in the right place. If you place it somewhere manually because you have no internet, that probably won't be right. It seems you can set
e.g. which looks like:
|
@pseudotensor please guide me to implementing this. |
Hi @glenbhermon I'm really not sure what is wrong if you have the files in the expected place. UKPLab/sentence-transformers#1725 Seems should be no particular issue. |
You have mistakes in your run line, like missing -- before This works for me:
Depending upon if use links, may require more specific mappings to direct location not linked location that cannot be used
|
I ran exactly the same command that you mention: And now getting the following error:
The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
And when i adding the following arguments:
Then it shows the given error: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): The above exception was the direct cause of the following exception: Traceback (most recent call last): |
I followed all the instructions that are mentioned in the README_offline.md |
There's new bug in transformers where they auto convert non-safe tensors to safe, but they assume internet exists at that point. I patched transformers in the new linux_install.sh. You can run:
To fix the non-docker case, I'm building new docker at moment that would be ready in a few hours. Or you can delete your unsafe tensors and pass --use_safetensors=True while online to use those. |
I still got the same error when running running docker image on the machine which hasn't internet connection. |
The patch doesn't work on newer transformers. Try sticking to transformers==4.41.0 |
I updated the patch and requirements to be for |
I built the docker image from the repo and running it using the following commands :
When the container run first time it downloads models, ocr model and some configs from the internet then run successfully. But I want to run this docker image on another machine which haven't internet connection. How can i do that?
Can you provide the steps for creating the docker image that have all the necessary configs, ocr model and required language model inside the images that you can run on any machine without the internet connection? And also share the list of commands for running this new image which have all the required things.
The text was updated successfully, but these errors were encountered: