Jump to content
Ultimaker Community of 3D Printing Experts
  • Sign Up
arnaudcosson

Stuck up in creating a Docker image for CuraEngine

Recommended Posts

Posted · Stuck up in creating a Docker image for CuraEngine

Hi,

I am working on creating a docker image to have a centos machine with CuraEngine.

The purpose is to have an hosted instance to slice files from command lines.

I decide to base the image on centos because it is the distribution usually deployed in my compagny.

For install I followed instructions from https://github.com/Ultimaker/CuraEngine but I have an error with python version while installing libArcus.

Thanks for your help

Arnaud

Error:

 

-- Found PROTOBUF: /usr/local/lib/libprotobuf.so  CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:108 (message): Could NOT find PythonInterp: Found unsuitable version "2.7.5", but required is at least "3.4.0" (found /usr/bin/python)Call Stack (most recent call first): /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:313 (_FPHSA_FAILURE_MESSAGE) /usr/share/cmake/Modules/FindPythonInterp.cmake:139 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) cmake/FindSIP.cmake:32 (find_package) CMakeLists.txt:23 (find_package)-- Configuring incomplete, errors occurred!See also "/tmp/curabuild/libArcus-master/build/CMakeFiles/CMakeOutput.log".See also "/tmp/curabuild/libArcus-master/build/CMakeFiles/CMakeError.log".The command '/bin/sh -c cd /tmp/curabuild     && wget -O libArcus-master.zip https://github.com/Ultimaker/libArcus/archive/master.zip'>https://github.com/Ultimaker/libArcus/archive/master.zip     && unzip libArcus-master.zip     && cd libArcus-master     && mkdir build && cd build     && ls -la ..     && cmake ..     && make -j4     && make install' returned a non-zero code: 1

 

Dockerfile:

 

# Dockerfile for CuraEngineFROM centos#Global prerequisitesRUN yum install -y epel-releaseRUN yum install -y libtool gcc-c++ wget unzip makeRUN mkdir -p /tmp/curabuild# Install ProtobufRUN cd /tmp/curabuild/ \   && wget -O protobuffv3.4.1.zip https://github.com/google/protobuf/archive/v3.4.1.zip \   && unzip protobuffv3.4.1.zip \   && cd /tmp/curabuild/protobuf-3.4.1/ \   && ./autogen.sh && ./configure \   && make -j4 \   && make install#Install Python 3RUN yum install -y zlib-devel openssl-devel python34-dev#Install libArcusRUN yum install -y cmake python-devel sip-develRUN cd /tmp/curabuild \   && wget -O libArcus-master.zip https://github.com/Ultimaker/libArcus/archive/master.zip \   && unzip libArcus-master.zip \   && cd libArcus-master \   && mkdir build && cd build \   && ls -la .. \   && cmake .. \   && make -j4 \   && make installRUN cd /tmp/curabuild \#Install CuraEngine && wget -O CuraEngine3.0.zip https://github.com/Ultimaker/CuraEngine/archive/3.0.zip \ && unzip CuraEngine3.0.zip \ && cd CuraEngine-3.0 \ && mkdir build && cd build \ && cmake .. \ && make -j4

 

Share this post


Link to post
Share on other sites
Posted · Stuck up in creating a Docker image for CuraEngine

You can just build libArcus without python.

Share this post


Link to post
Share on other sites
Posted · Stuck up in creating a Docker image for CuraEngine

To disable build with python on libArcus, simply change the line

option(BUILD_PYTHON "Build " ON) by

option(BUILD_PYTHON "Build " OFF) in CMakeLists.txt

Share this post


Link to post
Share on other sites
Posted (edited) · Stuck up in creating a Docker image for CuraEngine

Little up on this post, still not able to build curaEngine on my docker

 

In file included from /tmp/curabuild/CuraEngine/src/pathPlanning/Comb.h:11:0,
                 from /tmp/curabuild/CuraEngine/src/LayerPlan.h:8,
                 from /tmp/curabuild/CuraEngine/src/FffGcodeWriter.h:15,
                 from /tmp/curabuild/CuraEngine/src/FffProcessor.h:5,
                 from /tmp/curabuild/CuraEngine/src/commandSocket.cpp:7:
/tmp/curabuild/CuraEngine/src/pathPlanning/../utils/LazyInitialization.h: In constructor 'cura::LazyInitialization<T, Args>::LazyInitialization(Args ...)':
/tmp/curabuild/CuraEngine/src/pathPlanning/../utils/LazyInitialization.h:34:18: error: expected ',' before '...' token
             [args...]()
                  ^

My search on the net drives me to this conclusion:

I'm not able to compile CuraEngine because the version of the compiler that is used is not the good one.

But I didn't figure how to change it.

devtoolset-3-gcc was supposed to do the job...

 

Here is my updated DockerFile:

# Dockerfile for CuraEngine

FROM centos

#Global prerequisites
RUN yum install -y epel-release
RUN yum install -y libtool gcc-c++ wget unzip make devtoolset-3-gcc git

RUN mkdir -p /tmp/curabuild

# Install Protobuf
RUN cd /tmp/curabuild/ \
    && wget -O protobuffv3.4.1.zip https://github.com/google/protobuf/archive/v3.4.1.zip \
    && unzip protobuffv3.4.1.zip \
    && cd /tmp/curabuild/protobuf-3.4.1/ \
    && ./autogen.sh && ./configure \
    && make -j4 \
    && make install

#Install Python 3
RUN yum install -y zlib-devel openssl-devel python34-dev

#Install libArcus
RUN yum install -y cmake python-devel sip-devel
RUN cd /tmp/curabuild \
    && git clone https://github.com/Ultimaker/libArcus.git \
    && cd libArcus \
    && sed -i '/option(BUILD_PYTHON "Build " ON)/c\option(BUILD_PYTHON "Build " OFF)' ./CMakeLists.txt \
    && mkdir build && cd build \
    && ls -la .. \
    && cmake .. \
    && make -j4 \
    && make install

RUN cd /tmp/curabuild \
#Install CuraEngine
  && git clone https://github.com/Ultimaker/CuraEngine.git \
  && cd CuraEngine/ \
  && mkdir build && cd build \
  && cmake .. \
  && make CXX=gcc-4.9 -j4

 

Edited by arnaudcosson

Share this post


Link to post
Share on other sites
Posted · Stuck up in creating a Docker image for CuraEngine

You are using gcc-4.9. I just checked, but i'm building the engine with gcc 6.4.1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Talking additive | The 3D printing podcast
      Why should we be the only ones asking questions? Join us and ask Jabil all your questions on September 22nd 5pm CET
        • Like
      • 2 replies
    • Ultimaker masterclass: Optimizing your Ultimaker Cura workflow
      Save your seat for either broadcast on September 23.
      What will you learn?
      · Best practices for iterative print preparation and every lesson you should learn from each print
      · The right way to use per-object settings and when they are most useful
      · Easy-to-use resources for anyone who wants to develop their own printer definitions, plugins, or print profiles
      · How to optimize print profile settings and whether to “keep” or “discard” changes
      · When is the right time to export your drawing from CAD? (Based on Ultimaker Cura’s surprising power as 3D control software)
      · And a whole lot more tips and tricks!
       
      How can I join?
      This free masterclass will take place twice:
      1. 11am CEST (5pm SGT, 5am EDT)
      2. 5pm CEST (11am EDT, 8am PDT, 11pm SGT)
        • Like
      • 0 replies
    • Do you use 3D printing at work? Let us know
      It doesn't matter if you are using 1 Ultimaker or 10, there is inspiration in everything. We're looking for ...
      • 1 reply
×
×
  • Create New...