Skip to content

Commit 2d52f3d

Browse files
committed
Updated container
1 parent fea8692 commit 2d52f3d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,5 @@ dmypy.json
140140
# Cython debug symbols
141141
cython_debug/
142142

143+
# Vim
144+
*.swp

Dockerfile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
FROM faasm/cpp-sysroot:0.0.16
2+
ARG FAASM_CPYTHON_VERSION
23

34
RUN apt install -y \
45
libssl-dev \
56
ninja-build
67

7-
WORKDIR /tmp
8-
COPY requirements.txt .
9-
COPY pyfaasm/test_requirements.txt .
10-
RUN pip3 install -r requirements.txt
11-
RUN pip3 install -r test_requirements.txt
8+
# Clone current tag
9+
WORKDIR /code
10+
RUN git clone \
11+
-b v${FAASM_CPYTHON_VERSION} \
12+
https://github.com/faasm/faasm-cpython
1213

13-
# Install build Python (careful with Docker cache here)
14+
# Install the build machine CPython
1415
WORKDIR /code/faasm-cpython
15-
COPY bin/install_build_python.sh bin/install_build_python.sh
1616
RUN ./bin/install_build_python.sh
1717

18-
# Add the rest of the code
19-
COPY . .
20-
2118
# Install pyfaasm natively
2219
WORKDIR /code/faasm-cpython/pyfaasm
2320
RUN pip3 install .
2421

25-
# Build CPython
22+
# Build CPython to wasm
2623
WORKDIR /code/faasm-cpython
2724
RUN inv cpython
2825

tasks/container.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def build(ctx, nocache=False, push=False):
2626
Build current version of the cpython container
2727
"""
2828
build_container(
29-
_get_tag(), DOCKERFILE, PROJ_ROOT, nocache=nocache, push=push
29+
_get_tag(), DOCKERFILE, PROJ_ROOT, nocache=nocache, push=push,
30+
build_args={"FAASM_CPYTHON_VERSION": get_version()}
3031
)
3132

3233

0 commit comments

Comments
 (0)