Skip to content

Commit

Permalink
Update curl command for Google Drive weights and adjust yaml files (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
amteusch committed Sep 13, 2022
1 parent 9f89787 commit 459f36c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- TDB

### Fixed
- TDB
- Update serverless function yamls (<https://github.com/opencv/cvat/pull/4944>)

### Security
- TDB
Expand Down
4 changes: 1 addition & 3 deletions serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions serverless/pytorch/saic-vul/hrnet/nuclio/function-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,12 @@ spec:
value: apt-get update && apt-get install software-properties-common -y
- kind: RUN
value: add-apt-repository ppa:deadsnakes/ppa
- kind: RUN
value: apt remove python* -y
- kind: RUN
value: apt-get update && apt-get install -y --no-install-recommends build-essential git curl libglib2.0-0 software-properties-common python3 python3.6-dev python3-pip python3-tk
- kind: RUN
value: ln -s /usr/bin/pip3 /usr/local/bin/pip && ln -s /usr/bin/python3 /usr/bin/python
- kind: RUN
value: pip3 install --upgrade pip
- kind: WORKDIR
Expand Down
18 changes: 9 additions & 9 deletions serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ metadata:

spec:
description: Interactive Object Segmentation with Inside-Outside Guidance
runtime: 'python:3.6'
runtime: 'python:3.9'
handler: main:handler
eventTimeout: 30s
env:
Expand All @@ -30,15 +30,19 @@ spec:
- kind: WORKDIR
value: /opt/nuclio
- kind: RUN
value: conda create -y -n iog python=3.6
value: conda create -y -n iog python=3.9
- kind: SHELL
value: '["conda", "run", "-n", "iog", "/bin/bash", "-c"]'
- kind: RUN
value: conda install -y -c anaconda curl
- kind: RUN
value: conda install -y pytorch=0.4 torchvision=0.2 -c pytorch
value: conda install -y pytorch torchvision -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==4.5.5.64
- kind: RUN
value: git clone https://github.com/shiyinzhang/Inside-Outside-Guidance.git iog
- kind: WORKDIR
Expand All @@ -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
Expand Down

0 comments on commit 459f36c

Please sign in to comment.