From 3ad262e3e64622ef531b81cf5c3bdb9390d595d7 Mon Sep 17 00:00:00 2001 From: Pierre Le Moine Date: Mon, 12 Apr 2021 17:47:15 +0200 Subject: [PATCH] Adding ubuntu docker file --- Dockerfile | 10 ++++++++++ LICENSE | 21 +++++++++++++++++++++ build.sh | 1 + run.sh | 11 +++++++++++ 4 files changed, 43 insertions(+) create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100755 build.sh create mode 100755 run.sh diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a678c43 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:latest + +# "Single command for python 3 and qt5" from https://wiki.freecadweb.org/Compile_on_Linux#Debian_and_Ubuntu +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends cmake cmake-gui libboost-date-time-dev libboost-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 libcoin-dev libeigen3-dev libgts-bin libgts-dev libkdtree++-dev libmedc-dev libocct-data-exchange-dev libocct-ocaf-dev libocct-visualization-dev libopencv-dev libproj-dev libpyside2-dev libqt5opengl5-dev libqt5svg5-dev libqt5webkit5-dev libqt5x11extras5-dev libqt5xmlpatterns5-dev libshiboken2-dev libspnav-dev libvtk7-dev libx11-dev libxerces-c-dev libzipios++-dev occt-draw pyside2-tools python3-dev python3-matplotlib python3-pivy python3-ply python3-pyside2.qtcore python3-pyside2.qtgui python3-pyside2.qtsvg python3-pyside2.qtwidgets pyqt5-dev-tools qtbase5-dev qttools5-dev swig + +# The single command above does not contain this stuff, also from https://wiki.freecadweb.org/Compile_on_Linux#Debian_and_Ubuntu +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential cmake libtool lsb-release python3 swig + +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..68a0c73 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Pierre LeMoine + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..eab6b2f --- /dev/null +++ b/build.sh @@ -0,0 +1 @@ +docker build --pull --rm -f "Dockerfile" -t freecad:latest . diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..63be563 --- /dev/null +++ b/run.sh @@ -0,0 +1,11 @@ +#git clone https://github.com/FreeCAD/FreeCAD.git ../source + +fc_source=$(pwd)/../source +fc_build=$(pwd)/../build +other_files=$(pwd)/../yolo +docker run -it --rm \ +-v $fc_source:/mnt/source \ +-v $fc_build:/mnt/build \ +-v $other_files:/mnt/files \ +-e "DISPLAY" -e "QT_X11_NO_MITSHM=1" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \ +freecad:latest bash