-
Notifications
You must be signed in to change notification settings - Fork 0
/
odelaySetConfig.py
58 lines (50 loc) · 1.95 KB
/
odelaySetConfig.py
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
49
50
51
52
53
54
55
56
57
58
import json
import os
import pathlib
import getpass
'''
This file sets up inital parameters for submitting jobs to cybertron
Please check this file regularly and update it with your personal
information as needed.
Note the json file this generates can have additional parametes saved to it to better manipulate and customize the ODELAY-ODELAM data pipeline.
'''
def setConfig():
PARENT_DIR = f'/home/{getpass.getuser()}/'
# for the PBSPro files. These values are important to passing the directories where experimental data is written and read.
environmentDict = {
'export IMGDIR': None,
'export DATDIR': None}
# Generally we won't need more than this but we could add more space if needed.
resourcesDict = {
'mem': '8gb',
'ncpus': '1'}
odelayConfig = {
'HOST':'ENTER_HOST_NAME_HERE',
'K_PATH': os.path.expanduser('~\.ssh\id_rsa'),
'JOB_TEMPLATE': 'pbs.sh',
'PARENT_DIR': f'/home/{getpass.getuser()}/',
'sponsor':'jaitch',
'email':'ENTER_EMAIL_HERE',
'name': 'testrun',
'resources': resourcesDict ,
'environment': environmentDict,
'queue': 'workq',
'stdout': f'{PARENT_DIR}odelay_logs/stdout',
'stderr': f'{PARENT_DIR}odelay_logs/stderr',
'emails': 'abe',
'cmd': 'sleep 5',
'setup': '',
'TemplateLocation': './templates',
'LocalImageDir': None,
'LocalDataDir': None,
'HPCImageDir': None,
'HPCDataDir': None,
'LocalDirPrefix':None,
'HPCDirPrefix': None,
'PathCheck': False,
'pbskeylist': ['sponsor', 'email', 'name', 'resources', 'environment', 'queue','stdout','stderr','emails','cmd','setup']
}
configfilePath = pathlib.Path( pathlib.Path.home() / '.odelayconfig' )
with open(configfilePath, 'w') as configFile:
json.dump(odelayConfig, configFile)
return None