Installing Cmake on a newly created python app service for dlib (CI delployment using github)

Salah Khattab 1 Reputation point
2021-08-26T16:36:41.713+00:00

Deploying my python web api from Github fails stating that Cmake is not installed.
After installing Cmake using the shell the error persists when deploying.
And for some reason Cmake is being removed whenever I stop and start the service again.
Is there any other way to add Cmake to the app service?

note: I am not using docker as I don't know how to.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,145 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Salah Khattab 1 Reputation point
    2021-08-31T08:14:07.507+00:00

    Hello @Grmacjon-MSFT ,

    I am trying to reply to your answer but for some reason the submit is not working. but here is the reply:

    Thank you for sharing the post, however the post solves a docker container issue as the file shared is a docker file.

    As for the list of commands I am using are as follows (executed on ssh):

    $ apt-get install build-essential  
    $ apt-get install libssl-dev  
    $ wget https://github.com/Kitware/CMake/releases/download/v3.21.2/cmake-3.21.2.tar.gz  
    $ tar xzf cmake-3.21.2.tar.gz  
    $ cd cmake-3.21.2  
    $ ./configure --prefix=/opt/cmake  
    $ make  
    $ make install  
    $ /opt/cmake/bin/cmake -version  
    

    The exact error:

    [19:58:37+0000] Running setup.py clean for dlib
    ERROR: Command errored out with exit status 1:
    command: /tmp/8d968028825ffc6/antenv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-y5898t_l/dlib/setup.py'"'"'; file='"'"'/tmp/pip-install-y5898t_l/dlib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-g7edkvbu
    cwd: /tmp/pip-install-y5898t_l/dlib/
    Complete output (8 lines):
    running bdist_wheel
    running build
    running build_py
    package init file 'tools/python/dlib/init.py' not found (or not a regular file)
    running build_ext

    ERROR: CMake must be installed to build dlib


    ERROR: Failed building wheel for dlib

    Thanks again,
    Salah

    0 comments No comments