-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
75 lines (58 loc) · 1.87 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
from emscripten/emsdk
USER root
#################
# Standart Libs #
#################
RUN apt-get update
RUN apt-get install -y wget build-essential automake libtool autoconf cmake python3
############
# Freetype #
############
WORKDIR /opt/build
RUN wget https://download.savannah.gnu.org/releases/freetype/freetype-2.10.0.tar.gz
RUN tar -zxvf freetype-2.10.0.tar.gz >> installed_freetype2100_files.txt
WORKDIR /opt/build/freetype-2.10.0
RUN sh autogen.sh
WORKDIR /opt/build/freetype2
WORKDIR /opt/build/freetype-2.10.0/build
RUN emconfigure ../configure
RUN emcmake cmake ..
RUN emmake make install
###############
# OpenCascade #
###############
WORKDIR /opt/build
RUN wget https://github.com/tpaviot/oce/releases/download/official-upstream-packages/opencascade-7.5.0.tgz
RUN tar -zxvf opencascade-7.5.0.tgz >> installed_occt750_files.txt
WORKDIR /opt/build/opencascade-7.5.0/build
RUN emmake cmake \
-DCMAKE_SIZEOF_VOID_P=8 \
-DINSTALL_DIR=/opt/build/occt750 \
-DBUILD_RELEASE_DISABLE_EXCEPTIONS=OFF \
-DBUILD_MODULE_Draw=OFF \
-DBUILD_LIBRARY_TYPE="Static" \
..
RUN emmake make -j10
RUN emmake make install
###############
# Sample wasm #
###############
WORKDIR /opt/build/opencascade-7.5.0/samples/webgl/
RUN emmake cmake \
-Dfreetype_DIR=/usr/local/lib/cmake/freetype/ \
-DOpenCASCADE_DIR=/opt/build/occt750/lib/cmake/opencascade/ \
-DCMAKE_INSTALL_PREFIX=/opt/build/opencascade-7.5.0/samples/webgl/ \
.
RUN emmake make
RUN emmake make install
# Why it is comming without extension?
RUN mv occt-webgl-sample occt-webgl-sample.js
WORKDIR /opt/build/opencascade-7.5.0/samples/webgl/samples
RUN cp /opt/build/opencascade-7.5.0/data/occ/Ball.brep /opt/build/opencascade-7.5.0/samples/webgl/samples
WORKDIR /opt/build/opencascade-7.5.0/samples
#################
# Simple servar #
#################
RUN apt-get -y install python3
EXPOSE 7000
CMD python3 -m http.server 7000