-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.server
85 lines (76 loc) · 3.11 KB
/
Dockerfile.server
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
80
81
82
83
84
85
# Roll out OpenCascade image
FROM quaoarcad/asitus-base:760-ubuntu-20_04
# NOTE: This Dockerfile works with version v1.1.0 of Analysis Situs (requiring OCC 7.4.0)
# The development branch of Analysis Situs requires a newer version of OCC
###############################################################################
#
# - OpenCascade: this is the geometric modeling kernel which provides the
# essential services such as B-rep modeling & shape
# interrogation, data exchange, shape healing, etc.
# https://github.com/Open-Cascade-SAS/OCCT
#
# - Analysis Situs: the open-source CAD platform providing the feature recognition
# services, data model, VTK-based visualization services for
# CAD models, and GUI/scripting prototyping framework.
# https://gitlab.com/ssv/AnalysisSitus
#
# - Eigen: linear algebra, vectors, matrices.
# https://eigen.tuxfamily.org/index.php?title=Main_Page
#
# - Rapidjson: output to JSON and export to glTF (Analysis Situs).
# https://rapidjson.org
#
# Ex. to build:
# > docker build --pull --rm -f "Dockerfile.server" -t asitus-server:latest "." --no-cache
###############################################################################
# Building Analysis Situs
# =======================
# Copy sources of Analysis Situs
COPY cmake /as/cmake
COPY src /as/src
COPY data /as/data
COPY asiExe.sh /as
COPY asiExeServer.sh /as
COPY CMakeLists.txt /as
# Analysis Situs dependencies
RUN apt-get -y install libeigen3-dev rapidjson-dev
# Hack: symlink the VTK build/lib directory to /usr/lib/vtk-8.2, as the VTK installation doesn't seem to
# copy its files to the /usr/lib directory
RUN ln -s /home/VTK-8.2.0/build/lib /usr/lib/vtk-8.2
# Analysis Situs
WORKDIR /as
RUN mkdir -p build
WORKDIR /as/build
RUN cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_INSTALL_RPATH="" \
-DINSTALL_DIR=/usr/local/bin/analysissitus \
-DDISTRIBUTION_TYPE=Complete \
-D3RDPARTY_DIR=/usr/lib \
-D3RDPARTY_OCCT_INCLUDE_DIR=/usr/include/opencascade \
-D3RDPARTY_OCCT_LIBRARY_DIR=/usr/lib \
-D3RDPARTY_EIGEN_DIR=/usr/include/eigen3/ \
-D3RDPARTY_QT_DIR_NAME=/usr/lib/qt5/ \
-D3RDPARTY_tcl_DIR=/usr/lib/x86_64-linux-gnu \
-D3RDPARTY_tcl_INCLUDE_DIR=/usr/include/tcl8.6 \
-D3RDPARTY_tcl_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
-D3RDPARTY_vtk_DIR=/usr \
-D3RDPARTY_vtk_INCLUDE_DIR=/usr/include/vtk-8.2 \
-D3RDPARTY_vtk_LIBRARY_DIR=/usr/lib/vtk-8.2 \
-D3RDPARTY_freetype_DIR=/usr \
-D3RDPARTY_freetype_INCLUDE_DIR=/usr/include/freetype2 \
-D3RDPARTY_freetype_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
-DUSE_MOBIUS=off \
-DUSE_INSTANT_MESHES=off \
-DUSE_RAPIDJSON=off \
-DUSE_NETGEN=off \
-DUSE_THREADING=off \
-D3RDPARTY_DIR=/usr/lib
RUN make -j8
RUN make -j8 install
WORKDIR /usr/local/bin/analysissitus/bin
EXPOSE 7755/udp
CMD ["./asiExeServer.sh", "/host=0.0.0.0", "/port=7755"]
### Run with:
### > docker run --rm -it -e DISPLAY=192.168.1.42:0.0 -p 7755:7755/udp asitus-server:latest