I need to deploy a web app on OpenShift online platform which involves using a file that's stored on github repo with lfs.
When I built the app, I received this message:
---> Running application from Python script (app.py) ...
generated new fontManager
Traceback (most recent call last):
File "app.py", line 72, in <module>
model.load_state_dict(torch.load(WEIGHTS_FILE, map_location=device))
File "/opt/app-root/lib/python3.6/site-packages/torch/serialization.py", line 585, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/opt/app-root/lib/python3.6/site-packages/torch/serialization.py", line 755, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
I guess the reason must be that the weight file is stored by lfs. It looks like that OpenShift simply git pull the repo instead of git-lfs pull.
I used to git pull the entire repo to the terminal when I used other web services platforms, e.g. GCP, Azure.
So is it possible to open a terminal console and then I could git pull the repo? Or, any other alternatives?
PS: I am building it with dockerfile and here is my repo: https://github.com/MemphisMeng/global-wheat-detection-web-app