I am trying to deploy a Flask/ML app to Google Cloud but encountering this issue;
When I try to run gcloud builds submit --tag gcr.io/project-name/index
with a requirements.txt file, it throws CMake must be installed to build dlib. Since now, I didn't have any problems working with dlib (I have cmake and build-essential already installed) and when I connect Google Cloud Shell via ssh, I can see both build-essential and cmake is installed and up to date on there too.
I tried to build on Ubuntu and Windows machines, same error consists.
Solved! CMake needs to be built in Dockerfile, not locally or in cloud shell.
Adding RUN apt-get update && apt-get -y install cmake
before RUN pip install -r requirements.txt
in Dockerfile resolved the issue.