A docker container for building and running FreeCAD

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

A docker container for building and running FreeCAD

Postby David_D » Thu Feb 07, 2019 5:29 am

Hello.

I'm pretty lazy, so I didn't want to build FreeCAD within my workstation distro of choice, Solus. To be able to build it within Debian instead, with all it's many wonderful packages, I built a docker container.

I've put it on Gitlab, just in case someone else can find some use in it.

https://gitlab.com/daviddaish/freecad_docker_env
User avatar
Kunda1
Posts: 5216
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Postby Kunda1 » Thu Feb 07, 2019 9:44 pm

Cool. Can you build one that is Py3/Qt5 (incl. pyside2/shiboken2)
Running
OCC 7.3.0
Vtk 8.x
gmsh 4.1.x
etc...

Basically all the libs that we use in Conda
https://github.com/FreeCAD/FreeCAD_Conda
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: 37
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Fri Feb 08, 2019 8:28 am

Ah, interesting, I wasn't aware there were newer versions for all the dependencies. I'm looking into this now.
User avatar
Kunda1
Posts: 5216
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Postby Kunda1 » Fri Feb 08, 2019 4:52 pm

David_D wrote:
Fri Feb 08, 2019 8:28 am
Ah, interesting, I wasn't aware there were newer versions for all the dependencies. I'm looking into this now.
Thanks for looking in to this.
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: A docker container for building and running FreeCAD

Postby looo » Fri Feb 08, 2019 5:20 pm

I tried to make something similar once, but this wasn't successful https://github.com/FreeCAD/FreeCAD_Cond ... Dockerfile. It would be nice to have a docker container including all the dependencies of freecad, an ide (like kdevelop), git, and the freecad source. Ideally everything should be compiled already (maybe in debug-mode).

So to get started with freecad development all one has to do is:

Code: Select all

docker run --name freecad-dev freecad/freecad-development
and this starts the ide.
This would be soooo useful.
User avatar
Kunda1
Posts: 5216
Joined: Thu Jan 05, 2017 9:03 pm

Re: A docker container for building and running FreeCAD

Postby Kunda1 » Fri Feb 08, 2019 5:26 pm

looo wrote:
Fri Feb 08, 2019 5:20 pm
This would be soooo useful.
good point. Created issue #3821 to track this.
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: 37
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Fri Feb 15, 2019 12:07 am

Blimey, I am having some real difficulties getting the pivy build script to work. I have a horrible feeling I'll need to do development on it. God help me.
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: A docker container for building and running FreeCAD

Postby looo » Fri Feb 15, 2019 4:25 pm

David_D wrote:
Fri Feb 15, 2019 12:07 am
Blimey, I am having some real difficulties getting the pivy build script to work. I have a horrible feeling I'll need to do development on it. God help me.
Which way you want to install it? Which version of coin do you use?
David_D
Posts: 37
Joined: Fri Jun 29, 2018 6:43 am

Re: A docker container for building and running FreeCAD

Postby David_D » Sat Feb 16, 2019 4:13 am

looo wrote:
Fri Feb 15, 2019 4:25 pm
Which way you want to install it? Which version of coin do you use?
I'd be happy with any way to install it. I've been trying to get the setup.py script to work, to no avail. I've had an issue with Swig not being given the correct -I flags, the setup script not finding the qmake binary, and a bizzare issue with CMake concatenating things without prompting. All of these issues I've managed to resolve with some majorly hacky workarounds, and now the only issue I'm dealing with now (unless a new one pops up) is that Swig can't handle the #include_next preproccessor directive correctly.

If there's an alternative way to build and install it, I'm all ears.

I've been using Coin v3.1.3
looo
Posts: 2744
Joined: Mon Nov 11, 2013 5:29 pm

Re: A docker container for building and running FreeCAD

Postby looo » 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.