forked from faasm/python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (36 loc) · 1.04 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM kubasz51/faasm-cpp-sysroot:0.1.5
ARG FAASM_PYTHON_VERSION
RUN apt install -y \
libssl-dev \
libcurl4-openssl-dev \
ninja-build
# Hack to avoid rebuilding build CPython every time the code changes
WORKDIR /tmp
COPY bin/install_build_python.sh .
RUN ./install_build_python.sh
# Hack to avoid reinstalling Python libs every time
COPY requirements.txt .
RUN pip3 install -r requirements.txt
# Clone current tag
WORKDIR /code
RUN git clone \
-b v${FAASM_PYTHON_VERSION} \
https://github.com/auto-ndp/faasm-python python
# Submodules
WORKDIR /code/python
RUN git submodule update --init
# Build CPython to wasm
RUN inv cpython
# Set up crossenv
RUN ./bin/crossenv_setup.sh
# Install cross-compiled python packages
RUN . ./cross_venv/bin/activate && inv libs.install
# Build Faasm function
RUN inv func
# TODO - enable these once the MXNet/ Horovod work is completed
# Build mxnet
# RUN inv mxnet
# Install experimental pacakges
# RUN . ./cross_venv/bin/activate && inv libs.install --experimental
# Copy files into place
RUN inv runtime