Iβm trying to deploy a streamlit application, and it keep failing with the following error:
Error downloading object: wav2lip/checkpoints/wav2lip_gan.pth (ca9ab7b): Smudge error: Error downloading wav2lip/checkpoints/wav2lip_gan.pth (ca9ab7b7b812c0e80a6e70a5977c545a1e8a365a6c49d5e533023c034d7ac3d8): batch request: git@github.com: Permission denied (publickey).: exit status 255
Errors logged to /mount/src/ai-lip-sync/.git/lfs/logs/20240121T212252.496674307.log
Use `git lfs logs last` to view the log.
error: external filter 'git-lfs filter-process' failed
fatal: wav2lip/checkpoints/wav2lip_gan.pth: smudge filter lfs failed
I guess the problem is the fact that Streamlit is trying to pull the checkpoint file which is a big one without using git lfs, does anybody know how to fix such an issue?
It means in streamlit cloud we have upto 1gb of space. If you are is trying to download it again in the rebooting means it consuming more space. Due to that streamlit is consistently failed. Once check your coding part that your lfs is used for one time or it using for multiple time. If it is using one time means just use st.cachce_resource to store the model in cache helps us to prevent in downloading the model again and again.
Thank you @Guna_Sekhar_Venkata for helping.
I was using @st.cache_data but I changed it to @st.cache_resource so the code now looks like this:
@st.cache_resource
def load_model(path):
model = Wav2Lip()
print("Load checkpoint from: {}".format(path))
checkpoint = torch.load(path,map_location=lambda storage, loc: storage)
s = checkpoint["state_dict"]
new_s = {}
for k, v in s.items():
new_s[k.replace('module.', '')] = v
model.load_state_dict(new_s)
model = model.to(device)
return model.eval()
model = load_model('wav2lip/checkpoints/wav2lip_gan.pth')
But that didnβt work.
So I deleted the whole app -trying to free some space-, made a deployment branch and thentried to deploy it again but now Iβm stuck with the following error:
Failed to download the sources for repository: 'ai-lip-sync', branch: 'deployment', main module: 'app.py'
Thatβs the full log for reference:
[05:36:40] π₯ Provisioning machine...
[05:36:40] π Preparing system...
[05:36:40] β Spinning up manager process...
[05:36:42] π Starting up repository: 'ai-lip-sync', branch: 'deployment', main module: 'app.py'
[05:36:42] π Cloning repository...
[05:36:46] π failed
[05:36:59] π failed
[05:37:13] π failed
[05:37:26] π failed
[05:37:40] π failed
[05:37:50] π Failed to download the sources for repository: 'ai-lip-sync', branch: 'deployment', main module: 'app.py'
[05:37:50] π Make sure the repository and the branch exist and you have write access to it, and then reboot the app.
[05:39:22] βοΈ Streamlit server consistently failed status checks
[05:39:22] βοΈ Please fix the errors, push an update to the git repo, or reboot the app.
[05:39:55] π₯ Provisioning machine...
[05:40:00] π Preparing system...
[05:40:05] β Spinning up manager process...
[05:40:34] π Inflating balloons...
[05:40:40] π Unpacking Comic Sans RAR files...
[05:40:45] π§ Loading "Under construction" GIF...
[05:40:50] π Compiling <blink> tags...
[05:40:55] π Initializing Java applet...
[05:41:00] β³ Please wait...
[05:40:04] π Starting up repository: 'ai-lip-sync', branch: 'deployment', main module: 'app.py'
[05:40:04] π Cloning repository...
[05:40:08] π failed
[05:40:25] π failed
[05:40:38] π failed
[05:40:52] π failed
[05:41:06] π failed
[05:41:16] π Failed to download the sources for repository: 'ai-lip-sync', branch: 'deployment', main module: 'app.py'
[05:41:16] π Make sure the repository and the branch exist and you have write access to it, and then reboot the app.
[05:42:54] βοΈ Streamlit server consistently failed status checks
[05:42:54] βοΈ Please fix the errors, push an update to the git repo, or reboot the app.
If you have an idea of how to solve that, please help me.
Thank you very much for your replay, I really appreciate it.
I was sure that there were no conflicts as I actually didnβt change anything in the deployment branch.
But I still deleted the app and that branch, re-deployed from the main this time and still, the same issue.
[12:40:32] π₯ Provisioning machine...
[12:40:32] π Preparing system...
[12:40:32] β Spinning up manager process...
[12:40:29] π Starting up repository: 'ai-lip-sync', branch: 'main', main module: 'app.py'
[12:40:29] π Cloning repository...
[12:40:32] π failed
[12:40:47] π failed
[12:41:01] π failed
[12:41:16] π failed
[12:41:30] π failed
[12:41:40] π Failed to download the sources for repository: 'ai-lip-sync', branch: 'main', main module: 'app.py'
[12:41:40] π Make sure the repository and the branch exist and you have write access to it, and then reboot the app.
I donβt know what to do now, should I try another way ?
There there should one solution that delete the current app and make a new app deployment or else merge the brach with the main branch and redeploy it again
I solved this thing by simply giving up on git lfs!
I just uploaded every heavy file to my Google Drive account, put them in a public folder, and then used a module called gdown to download those folders when needed!
hereβs a link to that gdown, itβs straightforward to use and install.
Now Iβm facing a dependency error so I opened another issue with it! good luck to all the miserable souls who have to deploy anything!
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking βAccept allβ, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.