Skip to content

Commit

Permalink
Merge pull request #62 from 2i2c-org/empty-dir
Browse files Browse the repository at this point in the history
Delete empty directories after pulling ground truth
  • Loading branch information
yuvipanda authored Nov 26, 2024
2 parents 0749a9c + 2fa6d43 commit a67d3ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helm-charts/app/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ frx-challenges:
- /bin/sh
- -c
# use printf so we don't interpret the \n in service account keys's private key
# Delete empty directories, since `gcloud storage rsync` with `--delete-unmatched-destination-objects`
# does not seem to actually delete directories created, only the leaf objects (sometimes).
- |
export CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=/tmp/gcloud-auth && \
printf '%s' "$SERVICE_ACCOUNT_JSON_KEY" > $CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE && \
cat $CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE && \
mkdir -p /opt/state/truth/ && \
gcloud storage rsync --recursive --delete-unmatched-destination-objects \
gs://cellmap-challenge-ground-truth-fake/gt.zarr /opt/state/truth/gt.zarr
gs://cellmap-challenge-ground-truth-fake/gt.zarr /opt/state/truth/gt.zarr && \
find /opt/state/truth/ -type d -empty -delete
volumeMounts:
- name: storage
mountPath: /opt/state
Expand Down

0 comments on commit a67d3ae

Please sign in to comment.