#!/bin/bash # Set the S3 bucket and prefix S3_BUCKET="caemldatasets" S3_PREFIX="ahmed/dataset" # # # Set the local directory to download the files # LOCAL_DIR="./drivaer_data" # # # Create the local directory if it doesn't exist # mkdir -p "$LOCAL_DIR" # # # Loop through the run folders from 1 to 500 (here you can change the number to only download a subset of the runs) for i in $(seq 278 500); do RUN_DIR="run_$i" RUN_LOCAL_DIR="$RUN_DIR" # # # Create the run directory if it doesn't exist # mkdir -p "$RUN_LOCAL_DIR" # # # Download the drivaer_i.stl file aws s3 cp --recursive --no-sign-request "s3://$S3_BUCKET/$S3_PREFIX/$RUN_DIR" "$RUN_LOCAL_DIR/" --only-show-errors # # # Download the force_mom_i.csv file # aws s3 cp "s3://$S3_BUCKET/$S3_PREFIX/$RUN_DIR/force_mom_$i.csv" "$RUN_LOCAL_DIR/" --only-show-errors # # aws s3 cp --recursive "s3://$S3_BUCKET/$S3_PREFIX/$RUN_DIR/images" "$RUN_LOCAL_DIR/images/" --only-show-errors done