"...resnet50_tensorflow.git" did not exist on "e1df7597a75b70f13a6f368f9a7c0dadeaf80101"
Unverified Commit e4f0f6e3 authored by Jakob Görgen's avatar Jakob Görgen Committed by GitHub
Browse files

orchestration: absolue path check images (#102)

ExpEnv hd_path and hd_path_raw use absolute path unmodified if given as param
parent 8134c8c2
...@@ -66,11 +66,25 @@ class ExpEnv(object): ...@@ -66,11 +66,25 @@ class ExpEnv(object):
def hdcopy_path(self, sim: 'simulators.Simulator') -> str: def hdcopy_path(self, sim: 'simulators.Simulator') -> str:
return f'{self.workdir}/hdcopy.{sim.name}' return f'{self.workdir}/hdcopy.{sim.name}'
def hd_path(self, hd_name: str) -> str: @staticmethod
return f'{self.repodir}/images/output-{hd_name}/{hd_name}' def is_absolute_exists(path: str) -> bool:
return os.path.isabs(path) and os.path.isfile(path)
def hd_path(self, hd_name_or_path: str) -> str:
if ExpEnv.is_absolute_exists(hd_name_or_path):
return hd_name_or_path
return (
f'{self.repodir}/images/output-{hd_name_or_path}/'
f'{hd_name_or_path}'
)
def hd_raw_path(self, hd_name: str) -> str: def hd_raw_path(self, hd_name_or_path: str) -> str:
return f'{self.repodir}/images/output-{hd_name}/{hd_name}.raw' if ExpEnv.is_absolute_exists(hd_name_or_path):
return f'{hd_name_or_path}.raw'
return (
f'{self.repodir}/images/output-{hd_name_or_path}/'
f'{hd_name_or_path}.raw'
)
def cfgtar_path(self, sim: 'simulators.Simulator') -> str: def cfgtar_path(self, sim: 'simulators.Simulator') -> str:
return f'{self.workdir}/cfg.{sim.name}.tar' return f'{self.workdir}/cfg.{sim.name}.tar'
......
...@@ -87,7 +87,7 @@ class NodeConfig(): ...@@ -87,7 +87,7 @@ class NodeConfig():
self.memory = 512 self.memory = 512
"""Amount of system memory in MB.""" """Amount of system memory in MB."""
self.disk_image = 'base' self.disk_image = 'base'
"""Name of disk image to use.""" """Name of disk image to use or absolute path to image."""
self.mtu = 1500 self.mtu = 1500
"""Networking MTU.""" """Networking MTU."""
self.nockp = 0 self.nockp = 0
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment