forked from ibestrace/canvas-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpredeploy.py
More file actions
26 lines (23 loc) · 675 Bytes
/
Copy pathpredeploy.py
File metadata and controls
26 lines (23 loc) · 675 Bytes
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
import os
import shutil
import subprocess
APPNAME_TO_DIRECTORY = {
'bounding-box': 'bounding-box',
'correct-segmentation': 'correct-segmentation',
'measure-length': 'measure-length',
'object-properties': 'object-properties',
'remove-background': 'remove-background',
'segmentation': 'segmentation',
'stitch-images': 'stitch-images'
}
files = ['requirements.txt', 'Procfile', 'DOKKU_SCALE']
for f in files:
shutil.copyfile(
os.path.join(
'apps',
APPNAME_TO_DIRECTORY[os.environ['DASH_APP_NAME']],
f
),
f
)
subprocess.run('python -m pip install -r requirements.txt'.split(' '))