deepset-ai / haystack

:mag: AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
16.96k stars 1.85k forks source link

Download Model using Proxy #7595

Closed dmitrimahayana closed 4 months ago

dmitrimahayana commented 5 months ago

Describe the bug Currently, our server is running behind the firewall. How we can download the model through the proxy? I use this:

    if os.environ["isafe_semantic_search_environment"] == ".env.prod":
        os.environ['http_proxy'] = 'http://10.10.1.10:3128'
        os.environ['https_proxy'] = 'https://10.10.1.10:1080'
        log_daily_index.logger.info(f"Enable proxy {os.environ['http_proxy']}")
        log_daily_index.logger.info(f"Enable proxy {os.environ['https_proxy']}")
    else:
        log_daily_index.logger.info(f"Disable proxy")

But there is no model downloaded in the .cache folder. Do we have an option to download the model using a proxy?

Error message Failed to download model using Proxy

Expected behavior Failed to download model using Proxy

To Reproduce The VM must be running behind the Proxy and use the Proxy to download the model.

FAQ Check

System:

masci commented 4 months ago

Hard to say without the actual connection error, but in any case this is a problem in transformers, not Haystack, I suggest you have a look in their documentation and issue tracker, for example https://github.com/huggingface/transformers/issues/28934. Feel free to reopen if you find out this is actual a Haystack problem.