diff --git a/src/cirrocumulus/.devcontainer.json b/src/cirrocumulus/.devcontainer.json index 0937c0ba..ee8eef1d 100644 --- a/src/cirrocumulus/.devcontainer.json +++ b/src/cirrocumulus/.devcontainer.json @@ -12,15 +12,8 @@ "${templateOption:login}" ], // re-mount bucket files on container start up - "postStartCommand": [ - "./startupscript/remount-on-restart.sh", - "root", - "/root", - "${templateOption:cloud}", - "${templateOption:login}" - ], + "postStartCommand": "chmod +x /workspace/scripts/cirro_scanner.sh && nohup /workspace/scripts/cirro_scanner.sh > /root/.workbench/logs/cirro_scanner.log 2>&1 &", "features": { - "ghcr.io/devcontainers/features/aws-cli@sha256:bbc9fd513c22e331953126c75ad7b2ed1f9044f1cd5890b7073b634810459b18": {}, "ghcr.io/dhoeric/features/google-cloud-cli@sha256:fa5d894718825c5ad8009ac8f2c9f0cea3d1661eb108a9d465cba9f3fc48965f": {}, "ghcr.io/devcontainers/features/java@sha256:df67d6ff6e9cdd858207ae9e92a99ddb88384b789f79eecd6f873216e951d286": {} }, diff --git a/src/cirrocumulus/Dockerfile b/src/cirrocumulus/Dockerfile index 21f127cb..84e775c5 100644 --- a/src/cirrocumulus/Dockerfile +++ b/src/cirrocumulus/Dockerfile @@ -1,8 +1,9 @@ # Use an official Python runtime as a parent image -FROM mcr.microsoft.com/vscode/devcontainers/python:3.10-buster +FROM mcr.microsoft.com/vscode/devcontainers/python:3.12-bookworm ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Install any needed packages specified in requirements.txt -RUN python -m pip install --upgrade pip && python -m pip install cirrocumulus +RUN python -m pip install --upgrade pip && \ + python -m pip install cirrocumulus diff --git a/src/cirrocumulus/scripts/cirro_scanner.sh b/src/cirrocumulus/scripts/cirro_scanner.sh index c09a4a26..3d198729 100755 --- a/src/cirrocumulus/scripts/cirro_scanner.sh +++ b/src/cirrocumulus/scripts/cirro_scanner.sh @@ -29,7 +29,7 @@ readonly -f create_dataset # Define the function to perform the scanning function scan_folders_and_create_datasets() { # Search for folders with name *.zarr and create cirro dataset if it doesn't exist - find /root/workspace -type d -name '*.zarr' | while read -r folder; do + find /root/workspace \( -type d -name '*.zarr' -o -type f -name '*.h5ad' \) | while read -r folder; do if [[ "$(matching_dataset_count "${folder}")" -eq "0" ]]; then create_dataset "${folder}" else diff --git a/startupscript/post-startup.sh b/startupscript/post-startup.sh index 3e849642..793c5264 100755 --- a/startupscript/post-startup.sh +++ b/startupscript/post-startup.sh @@ -34,7 +34,7 @@ source "${SCRIPT_DIR}/emit.sh" source "${CLOUD_SCRIPT_DIR}/vm-metadata.sh" -readonly RUN_AS_LOGIN_USER="sudo -u ${USER_NAME} bash -l -c" +readonly RUN_AS_LOGIN_USER="sudo -u ${USER_NAME} bash -c" export RUN_AS_LOGIN_USER # Startup script status is propagated out to VM guest attributes