Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Sep 23, 2024
1 parent e92c6b2 commit 2cfd2fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions feedstock/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


src_path = 'gs://leap-scratch/norlandrhagen/air_temp.zarr'
dst_path = 's3://m2lines-test/test-transfer/air_temp.zarr/*'
dst_path = 's3://m2lines-test/test-transfer/air_temp.zarr/'

import subprocess
src_pattern = pattern_from_file_sequence([src_path], concat_dim="time")
Expand All @@ -40,10 +40,9 @@ def transfer(self, source_store) -> str:
client = secretmanager.SecretManagerServiceClient()
aws_id = client.access_secret_version(name=f"projects/leap-pangeo/secrets/OSN_CATALOG_BUCKET_KEY/versions/latest").payload.data.decode("UTF-8")
aws_secret = client.access_secret_version(name=f"projects/leap-pangeo/secrets/OSN_CATALOG_BUCKET_KEY_SECRET/versions/latest").payload.data.decode("UTF-8")
os.environ["aws_access_key_id"] = aws_id
os.environ["aws_secret_access_key"] = aws_secret

command = f"s5cmd --endpoint-url https://nyu1.osn.mghpcc.org {source_store} '{self.target_store}'"
os.environ["AWS_ACCESS_KEY_ID"] = aws_id
os.environ["AWS_SECRET_ACCESS_KEY"] = aws_secret
command = f"s5cmd --endpoint-url https://nyu1.osn.mghpcc.org cp {source_store} {self.target_store}"
logger.warn(command)

ls_out = subprocess.run(command, shell=True, capture_output=True, text=True)
Expand Down

0 comments on commit 2cfd2fa

Please sign in to comment.