Skip to content

Commit

Permalink
added VENV setting to slurm config
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Feb 28, 2022
1 parent a82c37e commit 4653caf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions daliuge-engine/dlg/deploy/configs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def __init__(self):
l = self.init_list()
self.setpar("acc", l[0])
self.setpar("log_root", l[1])
self.setpar("modules",l[2])
self.setpar("modules",l[2].strip())
self.setpar("venv",l[3].strip())

def init_list(self):
pass
Expand All @@ -59,20 +60,22 @@ def getpar(self, k):

class ICRARoodConfig(DefaultConfig):
MODULES = """
module load python/3.8.12
"""
module load python/3.8.12
"""
# The following is more a workaround than a solution
# requires the user to have a venv exectly in that place
VENV = """
source $HOME/dlg/venv/bin/activate
source $HOME/dlg/venv/bin/activate
"""
def __init__(self):
super(ICRARoodConfig, self).__init__()

def init_list(self): # TODO please fill in
HOME_DIR = os.environ['HOME']
ACCOUNT = os.environ['USER']
return [ACCOUNT, f"{HOME_DIR}/dlg/runs", self.MODULES]
return [ACCOUNT, f"{HOME_DIR}/dlg/runs",
self.MODULES,
self.VENV]

class GalaxyMWAConfig(DefaultConfig):
def __init__(self):
Expand Down

0 comments on commit 4653caf

Please sign in to comment.