forked from TencentARC/GFPGAN
/
deploy-gfpgan.yaml
47 lines (45 loc) · 1019 Bytes
/
deploy-gfpgan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
jobs:
CloneRepo:
outputs:
repo:
type: volume
uses: git-checkout@v1
with:
url: https://github.com/gradient-ai/gfpgan.git
GetModel:
resources:
instance-type: C5
inputs:
repo: CloneRepo.outputs.repo
outputs:
trained-model:
type: dataset
with:
ref: dstk425ln2zhv8g
uses: script@v1
with:
script: |-
pip install flask
cd inputs/repo
mkdir flaskapp
cd flaskapp
mkdir upload
wget https://github.com/TencentARC/GFPGAN/releases/download/v0.2.0/GFPGANCleanv1-NoCE-C2.pth
flask myapp.py
cd ..
cp -R flaskapp /outputs/trained-model
image: "nvcr.io/nvidia/pytorch:21.10-py3"
UploadModel:
resources:
instance-type: C5
inputs:
model: GetModel.outputs.trained-model
outputs:
model-id:
type: string
needs:
- GetModel
uses: create-model@v1
with:
name: trained-model
type: Custom