Open rsignell opened 5 months ago
Thanks @rsignell and @andreall , I'll be in touch here.
@LorenzoCorgnati, if you would like to put data from your local computer onto the OSN pod, copy the ~/.aws/credentials
file from Nebari onto your local computer (and put it in ~/.aws/credentials
.
Your local python environment should include these packages:
fsspec
s3fs
Then you should be able to move files (or directories) to OSN using fsspec using the pattern we learned in the class (the simple object storage writing example where we uploaded the air_temperature.nc file). You can use recursive=True
to upload a directory.
So an example code block (after you've added the osn-esip
profile to your ~/.aws/credentials
file) would be:
import fsspec
osn_endpoint_url = 'https://ncsa.osn.xsede.org'
fs_write = fsspec.filesystem('s3', profile='osn-esip', skip_instance_cache=True, use_listings_cache=False, client_kwargs={'endpoint_url': osn_endpoint_url})
fs_write.cp('/my/local/data_folder', 'esip/your-user-name/your-data-folder', recursive=True)
ok thanks this may be relevant also for issue #4
ping @andreall