From b7cdd5211c457c7e103ebb9dbd1ec937a0ceaee5 Mon Sep 17 00:00:00 2001 From: Jake Awe Date: Thu, 1 Feb 2024 13:24:11 -0600 Subject: [PATCH] fix cugraph notebooks --- Dockerfile | 2 ++ context/notebooks.sh | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 61344057..e59923ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,6 +24,8 @@ RUN pip install --upgrade conda-merge rapids-dependency-file-generator COPY condarc /condarc COPY notebooks.sh /notebooks.sh +RUN apt-get update && apt-get install -y rsync && rm -rf /var/lib/apt/lists/* + RUN /notebooks.sh diff --git a/context/notebooks.sh b/context/notebooks.sh index c64b887c..9b6ede95 100755 --- a/context/notebooks.sh +++ b/context/notebooks.sh @@ -15,7 +15,20 @@ mkdir -p /notebooks /dependencies for REPO in "${NOTEBOOK_REPOS[@]}"; do echo "Cloning $REPO..." git clone -b "${RAPIDS_BRANCH}" --depth 1 --single-branch "https://github.com/rapidsai/$REPO" "$REPO" - cp -rL "$REPO"/notebooks /notebooks/"$REPO" + + SOURCE="$REPO/notebooks" + DESTINATION="/notebooks/$REPO" + if [ "$REPO" = "cugraph" ]; then + echo "Special handling for $REPO..." + EXCLUDE_LIST=$(mktemp) + mkdir -p $DESTINATION + find "$SOURCE" -type f -name "SKIP_CI_TESTING" -printf "%h\n" | sed "s|^$SOURCE/||" > "$EXCLUDE_LIST" + rsync -avL --exclude-from="$EXCLUDE_LIST" "$SOURCE"/ "$DESTINATION"/ + rm "$EXCLUDE_LIST" + else + cp -rL "$SOURCE" "$DESTINATION" + fi + if [ -f "$REPO/dependencies.yaml" ] && yq -e '.files.test_notebooks' "$REPO/dependencies.yaml" >/dev/null; then echo "Running dfg on $REPO" rapids-dependency-file-generator \