forked from FreeCAD/Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
140 lines (116 loc) · 3.38 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
FROM ubuntu:jammy
ENV FREECAD_VERSION="FreeCAD-1-0"
LABEL MAINTAINER="xxxx@example.com"
LABEL DESCRIPTION="A docker image to build FreeCAD locally"
LABEL VERSION="$FREECAD_VERSION"
SHELL ["/bin/bash", "-c"]
WORKDIR /tmp
# REF: https://wiki.freecad.org/Compile_on_Linux
# #!/bin/sh
# sudo add-apt-repository --enable-source ppa:freecad-maintainers/freecad-daily && sudo apt-get update
# sudo apt-get build-dep freecad-daily
# sudo apt-get install freecad-daily
# git clone --recurse-submodules https://github.com/FreeCAD/FreeCAD.git freecad-source
# mkdir freecad-build
# cd freecad-build
# cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 -DFREECAD_USE_PYBIND11=ON ../freecad-source
# make -j$(nproc --ignore=2)
ENV DEBIAN_FRONTEND=noninteractive
# Build tools, and misc supporting tools
RUN apt update && \
apt install -y build-essential cmake libtool lsb-release git
# Python3
RUN apt install -y python3 swig
# Boost libraries
RUN apt install -y \
libboost-dev \
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-iostreams-dev \
libboost-program-options-dev \
libboost-python-dev \
libboost-regex-dev \
libboost-serialization-dev \
libboost-thread-dev
# Coin libraries
RUN apt install -y libcoin-dev libcoin-doc libcoin-runtime
# Misc libraries
RUN apt install -y \
libeigen3-dev \
libgts-bin \
libgts-dev \
libkdtree++-dev \
libmedc-dev \
libopencv-dev \
libproj-dev \
libvtk9-dev \
libx11-dev \
libxerces-c-dev \
libyaml-cpp-dev \
libzipios++-dev
# Python 3 and Qt5
RUN apt install -y \
libpyside2-dev \
libqt5opengl5-dev \
libqt5svg5-dev \
libqt5x11extras5-dev \
libqt5xmlpatterns5-dev \
libshiboken2-dev \
pyqt5-dev-tools \
pyside2-tools \
python3-dev \
python3-matplotlib \
python3-packaging \
python3-pivy \
python3-ply \
python3-pyside2.qtcore \
python3-pyside2.qtgui \
python3-pyside2.qtnetwork \
python3-pyside2.qtsvg \
python3-pyside2.qtwebchannel \
python3-pyside2.qtwebengine \
python3-pyside2.qtwebenginecore \
python3-pyside2.qtwebenginewidgets \
python3-pyside2.qtwidgets \
qtbase5-dev \
qttools5-dev \
qtwebengine5-dev
# OpenCascade
RUN apt install -y libocct*-dev occt-draw
# Optional packges
RUN apt install -y \
checkinstall \
doxygen \
graphviz \
libsimage-dev \
libspnav-dev
# To fix compilation problems
RUN apt install -y \
libhdf5-openmpi-dev \
python3-pip
# Known python dependencies
RUN python3 -m pip install ifcopenshell==0.8.0
# DEBUG C++ with gdb
RUN apt install -y gdb libcanberra-gtk-module libcanberra-gtk3-module
RUN python3 -m pip install gdbgui
ENV FREECAD_GDB_PORT=5000
EXPOSE 5000
# DEBUG Python with winpdb
RUN apt install -y wxpython-tools
RUN python3 -m pip install winpdb-reborn
ENV FREECAD_WINPDB_PORT=51000
ENV FREECAD_WINPDB_PWD=1234
EXPOSE 51000
# These environment variable are set here to be used
# by the different container's scripts
ENV FREECAD_CONFIG_DIR="/root/.local/FreeCAD"
ENV FREECAD_BUILD_DIR="/mnt/build"
ENV FREECAD_SOURCE_DIR="/mnt/source"
# Add the build & debug scripts
ADD add_files/build_FC.sh /root/build_FC.sh
ADD add_files/debug_FC_cpp.sh /root/debug_FC_cpp.sh
ADD add_files/debug_FC_python.sh /root/debug_FC_python.sh
ADD add_files/debug_FC_init.py /root/debug_FC_init.py
WORKDIR /root
# Note for later: May need -fPIC