A docker container for building and running FreeCAD

Having trouble installing or compiling FreeCAD? Get help here.
David_D
Posts: 35
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Sat Feb 16, 2019 10:13 pm

looo wrote:
Sat Feb 16, 2019 6:41 am
Coin3d has updated to cmake. Therefore I had to find a way to retrieve information of coin via cmake.
If you still have a coin version compiled with autotools, select the setup_old.py to build pivy.

If you have any suggestions how to improve the scripts please report them.
No, I certainly did install it with CMake.

I may offer a few suggestions, but for now, I just want to get this Docker container with the updated dependencies finished, even if I have to do it in a hacky way.

After that, I can wrap back around and offer some potential changes.
David_D
Posts: 35
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Mon Feb 25, 2019 2:26 am

Oh dear, the docker images are now so big, Docker is running out of space. I'm now trying to migrate docker to a separate drive. Quite the collection of dependencies we have, isn't it?

The final docker image this development produces for end users (developers) should be much smaller than what I'm currently dealing with, though, so it shouldn't be a problem for everyone else. ...Probably.
David_D
Posts: 35
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Thu Feb 28, 2019 7:41 am

David_D wrote:
Mon Feb 25, 2019 2:26 am
Oh dear, the docker images are now so big, Docker is running out of space. I'm now trying to migrate docker to a separate drive. Quite the collection of dependencies we have, isn't it?
Never mind, as it turns out, my Docker was configured to use a redundant storage system, and that was causing the problem. There go a few days worth of compiling down the drain.
David_D
Posts: 35
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Mon Mar 04, 2019 4:27 am

Wonderful news. I think the docker image is ready.

Would anyone like to test it? You can find it here.

It is missing the FEM and webview modules, but other than that, it seems fine. All the dependencies are at their newest stable versions, built from source.
User avatar
jmborer
Posts: 42
Joined: Thu Feb 28, 2019 5:39 pm
Location: Switzerland

Re: A docker container for building and running FreeCAD

Postby jmborer » Mon Mar 04, 2019 1:14 pm

When I built from the sources with the homebrew approach, I was also missing those modules. Can anyone see the reason for that?
User avatar
Kunda1
Posts: 3829
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Postby Kunda1 » Mon Mar 04, 2019 2:59 pm

David_D wrote:
Mon Mar 04, 2019 4:27 am
Wonderful news. I think the docker image is ready.

Would anyone like to test it? You can find it here.

It is missing the FEM and webview modules, but other than that, it seems fine. All the dependencies are at their newest stable versions, built from source.
I don't have a lot of experience with docker.

Do I need to run dockerd and also docker-compose up to get it running ?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
David_D
Posts: 35
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Mon Mar 04, 2019 8:38 pm

Kunda1 wrote:
Mon Mar 04, 2019 2:59 pm
I don't have a lot of experience with docker.

Do I need to run dockerd and also docker-compose up to get it running ?
Ah, fair enough.

Just install docker as specified on their website, or using your distro's install system. dockerd should start correctly on it's own if you follow those instructions.

If you're using Linux, the instructions for using the image should work fine. It relies on the X11 window system to have the freecad gui appear (which is ubiquitous on linux), but mac doesn't have it by default, and so won't work. To get it to work, according to these posts, a mac application called XQuartz should be able to add x11 support.

I don't have a mac system to test if this is the case or not, or offer more detailed support, but it appears to be relatively straight forward.
User avatar
Kunda1
Posts: 3829
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Postby Kunda1 » Sun Mar 10, 2019 12:50 pm

will get around to this soon.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
craig9
Posts: 20
Joined: Thu Mar 22, 2018 10:45 pm
Contact:

Re: A docker container for building and running FreeCAD

Postby craig9 » Sun Mar 10, 2019 10:19 pm

David_D wrote:
Mon Mar 04, 2019 4:27 am
Wonderful news. I think the docker image is ready.

Would anyone like to test it?
Hi David,

Thanks for setting up this docker image, I was trying to set up my own build environment and getting stuck on a couple of things. Now that you've done the hard work, I'll take advantage of it - and use it as an opportunity to learn docker.

So, as a new user to docker, just after installing it, I had to do the following and log back out and in before I could run the initial docker pull:

Code: Select all

sudo usermod -a -G docker $USER
Though that's almost certainly platform/package manager related (I'm on Ubuntu 18.10), other package managers may automatically add you to this or that group, etc.

During my first FreeCAD build, I hit a couple of errors:

Code: Select all

-- cmake: 3.13.4
CMake Warning at CMakeLists.txt:328 (message):
  BUILD_MESH_PART requires BUILD_PART;BUILD_MESH;BUILD_SMESH each be ON, but
  BUILD_SMESH is ""
and this:

Code: Select all

CMake Warning at CMakeLists.txt:876 (find_package):
  By not providing "FindQt5WebKitWidgets.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "Qt5WebKitWidgets", but CMake did not find one.

  Could not find a package configuration file provided by "Qt5WebKitWidgets"
  with any of the following names:

    Qt5WebKitWidgetsConfig.cmake
    qt5webkitwidgets-config.cmake

  Add the installation prefix of "Qt5WebKitWidgets" to CMAKE_PREFIX_PATH or
  set "Qt5WebKitWidgets_DIR" to a directory containing one of the above
  files.  If "Qt5WebKitWidgets" provides a separate development package or
  SDK, be sure it has been installed.
(Though - re-reading your notes, you did mention that we're missing the webview modules)

And finally, I spotted this:

Code: Select all

-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
Other than that, it's perfect. Even with the above minor issues, I can happily build and run FreeCAD from source now.

Thanks again,
Craig
David_D
Posts: 35
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Mon Mar 11, 2019 2:47 am

craig9 wrote:
Sun Mar 10, 2019 10:19 pm
Hi David,

Thanks for setting up this docker image, I was trying to set up my own build environment and getting stuck on a couple of things. Now that you've done the hard work, I'll take advantage of it - and use it as an opportunity to learn docker.
Hello Craig, that's great to hear it's working for you!

I am indeed aware of those issues, they are related to, in order, the absence of the FEM module/it's dependencies, the broken webview module, and an intentional lack of Doxygen, for a reason I cannot remember... maybe I should add that back in...