Skip to content

Commit

Permalink
Linting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evanyeyeye committed Dec 1, 2023
1 parent 8348ab5 commit 2e8a680
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion restful_tango/tangoREST.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,16 @@ def convertJobObj(self, dirName, jobObj):
input.append(handinfile)

# VM object
vm = self.createTangoMachine(jobObj["image"])
if "cores" in jobObj and "memory" in jobObj:
vm = self.createTangoMachine(
jobObj["image"],
vmObj={
"cores": jobObj["cores"],
"memory": jobObj["memory"],
},
)
else:
vm = self.createTangoMachine(jobObj["image"])

# for backward compatibility
accessKeyId = None
Expand Down
2 changes: 2 additions & 0 deletions vmms/localDocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ def runJob(self, vm, runTimeout, maxOutputFileSize):
)
args = ["docker", "run", "--name", instanceName, "-v"]
args = args + ["%s:%s" % (volumePath, "/home/mount")]
args = args + [f"--cpus={vm.cores}"]
args = args + ["-m", f"{vm.memory}m"]
args = args + [vm.image]
args = args + ["sh", "-c"]

Expand Down

0 comments on commit 2e8a680

Please sign in to comment.