From 7cc05e80deb88e9db1f85c737509c8db5dea4db6 Mon Sep 17 00:00:00 2001 From: Anastasia Yasakova Date: Wed, 5 Oct 2022 12:53:31 +0300 Subject: [PATCH] Fix serverless functions (#5039) * Fix some serverless functions * Update Changelog * Fixes --- CHANGELOG.md | 1 + .../pytorch/saic-vul/fbrs/nuclio/function.yaml | 4 +--- .../pytorch/shiyinzhang/iog/nuclio/function.yaml | 12 ++++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b14cd2af..301d9bdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ non-ascii paths while adding files from "Connected file share" (issue #4428) - Project import/export with skeletons (, ) - Unstable e2e restore tests () +- IOG and f-BRS serverless function () ### Security - TDB diff --git a/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml b/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml index fa53090b..6b11b2ff 100644 --- a/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml +++ b/serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml @@ -37,9 +37,7 @@ spec: - kind: ENV value: filename=resnet101_dh256_sbd.pth - kind: RUN - value: curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" - - kind: RUN - value: curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename} + value: curl -L "https://drive.google.com/uc?export=download&confirm=t&id=${fileid}" -o ${filename} - kind: RUN value: apt update && apt install -y libgl1-mesa-glx - kind: RUN diff --git a/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml b/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml index 3b979ee6..52da136c 100644 --- a/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml +++ b/serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml @@ -38,7 +38,11 @@ spec: - kind: RUN value: conda install -y pytorch=0.4 torchvision=0.2 -c pytorch - kind: RUN - value: conda install -y -c conda-forge pycocotools opencv scipy + value: apt update && apt install -y libgl1-mesa-glx + - kind: RUN + value: conda install -y -c conda-forge pycocotools scipy + - kind: RUN + value: pip install opencv-python - kind: RUN value: git clone https://github.com/shiyinzhang/Inside-Outside-Guidance.git iog - kind: WORKDIR @@ -48,11 +52,7 @@ spec: - kind: ENV value: filename=IOG_PASCAL_SBD.pth - kind: RUN - value: curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" - - kind: RUN - value: echo "/download/ {print \$NF}" > confirm_code.awk - - kind: RUN - value: curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk -f confirm_code.awk ./cookie`&id=${fileid}" -o ${filename} + value: curl -L "https://drive.google.com/uc?export=download&confirm=t&id=${fileid}" -o ${filename} - kind: WORKDIR value: /opt/nuclio - kind: ENTRYPOINT