forked from gruppe-adler/grad_aff_wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
79 lines (66 loc) · 2.94 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM emscripten/emsdk:2.0.20
# Install wasm-opt
WORKDIR /tmp
RUN curl -L https://github.com/WebAssembly/binaryen/releases/download/version_101/binaryen-version_101-x86_64-linux.tar.gz | tar xz
WORKDIR binaryen-version_101
RUN chmod +x bin/*
RUN find * -mindepth 0 -maxdepth 0 -type d -exec sh -c 'mkdir -p /usr/local/{} && mv $PWD/{}/* /usr/local/{}/' \;
RUN wasm-opt --version
# Install typescript compiler
RUN curl -fsSL https://deb.nodesource.com/setup_15.x | bash -
RUN apt-get install -y nodejs
RUN npm i -g [email protected]
RUN tsc -v
##############################################################################################################################
# Install lzokay
WORKDIR /tmp
RUN curl -L https://github.com/jackoalan/lzokay/archive/546a9695271e8a8b4711383f828172754fd825f2.tar.gz | tar xz
WORKDIR lzokay-546a9695271e8a8b4711383f828172754fd825f2/build
RUN emcmake cmake .. && emmake make && emmake make install
# Install ordered-map
WORKDIR /tmp
RUN curl -L https://github.com/Tessil/ordered-map/archive/refs/tags/v1.0.0.tar.gz | tar xz
WORKDIR ordered-map-1.0.0/build
RUN emcmake cmake .. && emmake make && emmake make install
# Install zlib
WORKDIR /tmp
RUN curl -L wget https://zlib.net/fossils/zlib-1.2.11.tar.gz | tar xz
WORKDIR zlib-1.2.11
RUN ./configure && emmake make install
# Install libpng
WORKDIR /tmp
RUN curl -L https://github.com/glennrp/libpng/archive/refs/tags/v1.6.35.tar.gz | tar xz
WORKDIR libpng-1.6.35
RUN ./configure && emmake make check && emmake make install
# Install boost
WORKDIR /tmp
RUN curl -L http://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.gz | tar xz
RUN mv boost_1_76_0 boost
# Install libsquish
WORKDIR /tmp/libsquish
RUN curl -L https://sourceforge.net/projects/libsquish/files/libsquish-1.15.tgz/download | tar xz
WORKDIR build
RUN emcmake cmake .. -DBUILD_SQUISH_WITH_SSE2=OFF -DBUILD_SQUISH_WITH_OPENMP=OFF && emmake make && emmake make install
# Install PEGTL
WORKDIR /tmp
RUN curl -L https://github.com/taocpp/PEGTL/archive/refs/tags/3.2.0.tar.gz | tar xz
WORKDIR PEGTL-3.2.0/build
RUN emcmake cmake .. -DPEGTL_BUILD_TESTS=OFF -DPEGTL_BUILD_EXAMPLES=OFF && emmake make && emmake make install
##############################################################################################################################
# Build grad_aff
WORKDIR /tmp
RUN curl -L https://github.com/gruppe-adler/grad_aff/archive/d6689c0563c904650fa2005a9c28ed466e4279bc.tar.gz | tar xz
WORKDIR grad_aff-d6689c0563c904650fa2005a9c28ed466e4279bc/build
RUN emcmake cmake .. \
-DBUILD_TESTS=OFF \
-DDYNAMIC_LIB=OFF \
-DGRAD_AFF_ENABLE_PARALLELISM=OFF \
-Dlzokay_DIR="/usr/local/lib/cmake/lzokay/" \
-Dpegtl_DIR="/usr/local/share/pegtl/cmake" \
-Dtsl-ordered-map_DIR="/usr/local/share/cmake/tsl-ordered-map" \
-DBoost_INCLUDE_DIR="/tmp/boost" \
-DSQUISH_INCLUDE_DIR="/usr/local/include" \
-DSQUISH_LIBRARY="/usr/local/lib/libsquish.a"
RUN emmake make
RUN emmake make install
WORKDIR /usr/src/app