Skip to content

Commit 1b2611e

Browse files
committed
Tidy-up
1 parent a3b74c4 commit 1b2611e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
black
22
invoke
3-
pyyaml

tasks/container.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@
1515
DOCKERFILE = join(PROJ_ROOT, "docker", "cpython.dockerfile")
1616

1717

18+
def _get_tag():
19+
tag_name = "{}:v{}".format(CONTAINER_IMAGE, get_version())
20+
return tag_name
21+
22+
1823
@task(default=True)
1924
def build(ctx, nocache=False, push=False):
2025
"""
2126
Build current version of the cpython container
2227
"""
23-
tag_name = "{}:{}".format(CONTAINER_IMAGE, get_version())
24-
2528
build_container(
26-
tag_name, DOCKERFILE, PROJ_ROOT, nocache=nocache, push=push
29+
_get_tag(), DOCKERFILE, PROJ_ROOT, nocache=nocache, push=push
2730
)
2831

2932

@@ -32,5 +35,4 @@ def push(ctx):
3235
"""
3336
Push the current version of the cpython container
3437
"""
35-
tag_name = "{}:{}".format(CONTAINER_IMAGE, get_version())
36-
push_container(tag_name)
38+
push_container(_get_tag())

tasks/runtime.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77

88
from invoke import task
99

10+
from faasmtools import FAASM_LOCAL_DIR
11+
1012
from tasks.env import PROJ_ROOT, THIRD_PARTY_DIR
1113

12-
FAASM_RUNTIME_ROOT = "/usr/local/faasm/runtime_root"
14+
FAASM_RUNTIME_ROOT = join(FAASM_LOCAL_DIR, "runtime_root")
1315
CPYTHON_SRC = join(THIRD_PARTY_DIR, "cpython")
1416
CPYTHON_INSTALL_DIR = join(CPYTHON_SRC, "install", "wasm")
1517
CROSSENV_WASM_DIR = join(PROJ_ROOT, "cross_venv", "cross")

0 commit comments

Comments
 (0)