I have a related question. I have an environment that doesn’t have internet. I downloaded the model inside of a docker container and moved the docker imaged into the no-internet environment.
It’s still giving me the Connection Error even if I pointed to the cached_dir. Is there anyway to stop the code from requiring a internet connection and just use the cached_dir?
        model_name = f'Helsinki-NLP/opus-mt-mul-en'
        # Download the model and the tokenizer
        cache_dir = "/root/.cache/huggingface/transformers"
        model = MarianMTModel.from_pretrained(model_name, cache_dir=cache_dir)
        tokenizer = MarianTokenizer.from_pretrained(model_name, cache_dir=cache_dir)