Skip to content

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)

@github-actions
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
@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.

2 participants