Skip to content

Commit 99ae243

Browse files
committed
Update curl command for Google Drive weights and adjust IOG dockerfile
1 parent 9f89787 commit 99ae243

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

serverless/pytorch/saic-vul/fbrs/nuclio/function.yaml

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ spec:
3737
- kind: ENV
3838
value: filename=resnet101_dh256_sbd.pth
3939
- kind: RUN
40-
value: curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"
41-
- kind: RUN
42-
value: curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
40+
value: curl -L "https://drive.google.com/uc?export=download&confirm=t&id=${fileid}" -o ${filename}
4341
- kind: RUN
4442
value: apt update && apt install -y libgl1-mesa-glx
4543
- kind: RUN

serverless/pytorch/shiyinzhang/iog/nuclio/function.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ metadata:
1414

1515
spec:
1616
description: Interactive Object Segmentation with Inside-Outside Guidance
17-
runtime: 'python:3.6'
17+
runtime: 'python:3.9'
1818
handler: main:handler
1919
eventTimeout: 30s
2020
env:
@@ -30,15 +30,19 @@ spec:
3030
- kind: WORKDIR
3131
value: /opt/nuclio
3232
- kind: RUN
33-
value: conda create -y -n iog python=3.6
33+
value: conda create -y -n iog python=3.9
3434
- kind: SHELL
3535
value: '["conda", "run", "-n", "iog", "/bin/bash", "-c"]'
3636
- kind: RUN
3737
value: conda install -y -c anaconda curl
3838
- kind: RUN
39-
value: conda install -y pytorch=0.4 torchvision=0.2 -c pytorch
39+
value: conda install -y pytorch torchvision -c pytorch
4040
- kind: RUN
41-
value: conda install -y -c conda-forge pycocotools opencv scipy
41+
value: apt update && apt install -y libgl1-mesa-glx
42+
- kind: RUN
43+
value: conda install -y -c conda-forge pycocotools scipy
44+
- kind: RUN
45+
value: pip install opencv-python==4.5.5.64
4246
- kind: RUN
4347
value: git clone https://github.com/shiyinzhang/Inside-Outside-Guidance.git iog
4448
- kind: WORKDIR
@@ -48,11 +52,7 @@ spec:
4852
- kind: ENV
4953
value: filename=IOG_PASCAL_SBD.pth
5054
- kind: RUN
51-
value: curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}"
52-
- kind: RUN
53-
value: echo "/download/ {print \$NF}" > confirm_code.awk
54-
- kind: RUN
55-
value: curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk -f confirm_code.awk ./cookie`&id=${fileid}" -o ${filename}
55+
value: curl -L "https://drive.google.com/uc?export=download&confirm=t&id=${fileid}" -o ${filename}
5656
- kind: WORKDIR
5757
value: /opt/nuclio
5858
- kind: ENTRYPOINT

0 commit comments

Comments
 (0)