Skip to content
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

Add functions for extracting multi-part archive #709

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Add functions for extracting multi-part archive #709

merged 1 commit into from
Mar 30, 2024

Conversation

giswqs
Copy link
Member

@giswqs giswqs commented Mar 30, 2024

This PR adds functions for downloading and extracting multi-part archives. This can be useful downloading deep learning pre-trained models (>2GB) from GitHub. Use the following command to create a multi-part archive and upload to GitHub as assets for releases.

zip -s 10m sam_hq_vit_tiny.zip sam_hq_vit_tiny.pth
import leafmap

files = ["sam_hq_vit_tiny.zip", "sam_hq_vit_tiny.z01", "sam_hq_vit_tiny.z02", "sam_hq_vit_tiny.z03"]
base_url = "https://github.com/opengeos/datasets/releases/download/models/"
urls = [base_url + f for f in files]
leafmap.download_files(urls, out_dir="models", multi_part=True)

Copy link

@github-actions github-actions bot temporarily deployed to pull request March 30, 2024 02:55 Inactive
@giswqs giswqs merged commit 3ae2a8a into master Mar 30, 2024
15 checks passed
@giswqs giswqs deleted the archive branch March 30, 2024 02:55
sthagen pushed a commit to sthagen/giswqs-leafmap that referenced this pull request Jul 10, 2024
kuzja111 pushed a commit to kuzja111/leafmap that referenced this pull request Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant