From 34eb13044cc76416107c9442fb1f0a273333a7ba Mon Sep 17 00:00:00 2001 From: Zimmra Date: Wed, 30 Aug 2023 20:46:04 -0700 Subject: [PATCH] Compile from source --- Dockerfile | 89 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index ff574dc..a3a6cc1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,21 +11,80 @@ LABEL maintainer="thelamer" # app title ENV TITLE=FreeCAD +# Add FreeCAD PPA +RUN apt-get update && \ + apt-get install -y software-properties-common && \ + add-apt-repository ppa:freecad-maintainers/freecad-stable + RUN \ echo "**** install packages ****" && \ apt-get update && \ - apt-get install --no-install-recommends -y \ - ocl-icd-libopencl1 \ - snapd \ - libfuse2 \ - python3-pip \ - python3-git \ - python3-xdg \ + apt-get install -y \ + build-essential \ + cmake \ + libtool \ + lsb-release \ + python3 \ + swig \ + 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 \ + libcoin-dev \ + libeigen3-dev \ + libgts-bin \ + libgts-dev \ + libkdtree++-dev \ + libmedc-dev \ + libopencv-dev \ + libproj-dev \ + libvtk6-dev \ + libx11-dev \ + libxerces-c-dev \ + libzipios++-dev \ + qtbase5-dev \ + qttools5-dev \ + qt5-default \ + libqt5opengl5-dev \ + libqt5svg5-dev \ + qtwebengine5-dev \ + libqt5xmlpatterns5-dev \ + libqt5x11extras5-dev \ + libpyside2-dev \ + libshiboken2-dev \ + pyside2-tools \ + pyqt5-dev-tools \ + python3-dev \ + python3-matplotlib \ + python3-packaging \ + python3-pivy \ + python3-ply \ + python3-pyside2.qtcore \ + python3-pyside2.qtgui \ + python3-pyside2.qtsvg \ + python3-pyside2.qtwidgets \ + python3-pyside2.qtnetwork \ python3-pyside2.qtwebengine \ python3-pyside2.qtwebenginecore \ python3-pyside2.qtwebenginewidgets \ python3-pyside2.qtwebchannel \ - xz-utils && \ + libocct*-dev \ + libocct-data-exchange-dev \ + libocct-draw-dev \ + libocct-foundation-dev \ + libocct-modeling-algorithms-dev \ + libocct-modeling-data-dev \ + libocct-ocaf-dev \ + libocct-visualization-dev \ + occt-draw \ + python3-pyside2uic \ + git && \ ln -s libOpenCL.so.1 /usr/lib/x86_64-linux-gnu/libOpenCL.so && \ echo "**** cleanup ****" && \ rm -rf \ @@ -33,8 +92,18 @@ RUN \ /var/lib/apt/lists/* \ /var/tmp/* -# Download the FreeCAD AppImage -RUN snap install freecad +RUN add-apt-repository universe + +RUN apt-get update && apt-get install -y libvtk7-dev + +# Clone FreeCAD source +RUN git clone https://github.com/FreeCAD/FreeCAD.git freecad-source + +# Create a build directory and compile FreeCAD +RUN mkdir freecad-build && \ + cd freecad-build && \ + cmake ../freecad-source && \ + make -j$(nproc --ignore=2) # add local files COPY /root /