Reputation: 590
I have a folder with predicted masks on AWS Sagemaker. ( It has 4 folders inside it and lot of files inside those folders. ) I want to download the entire folder to my laptop.
Upvotes: 29
Views: 32961
Reputation: 41
I have recently solved this issue and you can try it too. In your terminal, navigate to the directory where your files are stored. Compress your directory into a .tar.gz
. You can use the following command:
tar -czvf Folder.tar.gz /path/to/your/Folder
Once compression is complete, You can select the compressed .tar
file and you will find the multiple download option available.
Upvotes: 1
Reputation: 1054
I think the simplest and most straightforward approach is zipping and downloading the folder. Of course it has it's limitations and if that doens't fit the bill you can try using S3 way.
I've tried @sebtac approach but failed to install zip
using yum
. Though I was able to install it using the commands below:
conda install -y -c conda-forge zip
!zip -r -X folder.zip folder-to-zip
Upvotes: 0
Reputation: 1
There is one more way to do this- create a folder on S3 and copy the Sagemaker folder to S3 folder using-
aws s3 sync <sagemaker_folder_path_without_angular_brackets> <s3_folder_path_without_angular_brackets>
and then copy the S3 folder path and use the same command to copy it to the local machine-
aws s3 sync <s3_folder_path> <local_drive_address>
PS: You must have setup AWS CLI on your local machine!
Upvotes: 0
Reputation: 587
you can run into an issue that "zip command cannot be found" in such case first run:
sudo yum install zip unzip
Upvotes: 20
Reputation: 972
You can do that by opening a terminal on sagemaker. Navigate to the path where your folder is. Run the command to zip it
zip -r -X archive_name.zip folder_to_compress
You will find the zipped folder. You can then select it and download it.
Upvotes: 55