-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhere.py
More file actions
33 lines (24 loc) · 767 Bytes
/
here.py
File metadata and controls
33 lines (24 loc) · 767 Bytes
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
from os.path import dirname, abspath, join
from os import getcwd
from subprocess import run
PROJ_ROOT = dirname(dirname(abspath(__file__)))
def main():
version_file = join(PROJ_ROOT, "VERSION")
with open(version_file) as fh:
sysroot_ver = fh.read().strip()
image_tag = "faasm/cpp-sysroot:{}".format(sysroot_ver)
cwd = getcwd()
print("Running {} at {}".format(image_tag, cwd))
docker_cmd = [
'docker run --entrypoint="/bin/bash"',
'--network="host"',
'-e "TERM=xterm-256color"',
"-v {}:/work".format(cwd),
"-w /work",
"-it",
image_tag,
]
docker_cmd = " ".join(docker_cmd)
run(docker_cmd, shell=True, check=True, cwd=cwd)
if __name__ == "__main__":
main()