-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFUSION.py
More file actions
49 lines (35 loc) · 1.1 KB
/
FUSION.py
File metadata and controls
49 lines (35 loc) · 1.1 KB
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
48
"""
Running FUSION from fusion-tools
"""
import os
from fusion_tools.fusion import vis
def main():
dsa_url = 'https://3-230-122-132.nip.io/api/v1'
dsa_user = 'fusionguest'
dsa_pword = 'Fus3yWasHere'
host = os.environ.get('FUSION_HOST','0.0.0.0')
port = os.environ.get('FUSION_PORT',8000)
db_path = os.environ.get('DATABASE_PATH','./.fusion_assets/fusion_database.db')
if all([i is None for i in [dsa_url,dsa_user,dsa_pword]]):
raise Exception('Need to initialize with at least the environment variable: DSA_URL')
initial_items = [
'64ef9c712d82d04be3e2b330',
'64f542322d82d04be3e39e94',
'6495a4df3e6ae3107da10dc2',
'6495a4e03e6ae3107da10dc5'
]
args_dict = {
'girderApiUrl': dsa_url,
'user': dsa_user,# Optional
'pword': dsa_pword,# Optional,
'database': db_path,
'initialItems': initial_items,
'app_options': {
'host': host,
'port': port
}
}
fusion_vis = vis.get_layout(args_dict)
fusion_vis.start()
if __name__=='__main__':
main()