-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathBuildWasmDockerfile
62 lines (48 loc) · 1.84 KB
/
BuildWasmDockerfile
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
ARG EMSCRIPTEN_VER=3.1.45
FROM emscripten/emsdk:$EMSCRIPTEN_VER
ARG USER_ID
ARG GROUP_ID
RUN mkdir -p /install
RUN mkdir -p /install/lib
# make install dir
RUN mkdir install
##################################################################
# nloman json
##################################################################
RUN mkdir -p /deps/nlohmannjson/build && \
git clone --branch v3.11.3 --depth 1 https://github.com/nlohmann/json.git /deps/nlohmannjson/src
RUN cd /deps/nlohmannjson/build && \
emcmake cmake ../src/ -DCMAKE_INSTALL_PREFIX=/install -DJSON_BuildTests=OFF
RUN cd /deps/nlohmannjson/build && \
emmake make -j8 install
##################################################################
# xeus
##################################################################
RUN mkdir -p /deps/xeus/build
RUN git clone --branch 5.0.0 https://github.com/jupyter-xeus/xeus.git /deps/xeus/src
#COPY xeus /deps/xeus/src
RUN cd /deps/xeus/build && \
emcmake cmake ../src \
-DCMAKE_INSTALL_PREFIX=/install \
-Dnlohmann_json_DIR=/install/share/cmake/nlohmann_json \
-DXEUS_EMSCRIPTEN_WASM_BUILD=ON
RUN cd /deps/xeus/build && \
emmake make -j8 install
##################################################################
# xeus-lite itself
##################################################################
ADD ./CMakeLists.txt /
ADD ./src /src
ADD ./include /include
ADD ./xeus-liteConfig.cmake.in /
ADD ./test /test
RUN mkdir -p /xeus-build && cd /xeus-build && \
emcmake cmake .. \
-DCMAKE_INSTALL_PREFIX=/install \
-Dnlohmann_json_DIR=/install/share/cmake/nlohmann_json \
-Dxeus_DIR=/install/lib/cmake/xeus \
-DXEUS_LITE_BUILD_BROWSER_TEST_KERNEL=ON \
-DXEUS_LITE_BUILD_NODE_TESTS=ON
RUN cd /xeus-build && \
emmake make -j8
#####################################################