How to install CMake & DLIB on AWS EB?

1.1k views Asked by At

I am moving my project (minimal face recognition API) to Amazon Web Services Elastic Beanstalk.
I am having issues with requirements.txt.
I want to install DLIB which in turn depends upon CMake.
I've included CMake in my requirements.txt but while installing DLIB it says CMake should be installed!

Here are last few logs:

    ----------------------------------------
    Failed building wheel for dlib
    Running setup.py clean for dlib
  Failed to build dlib
  Installing collected packages: dlib
    Running setup.py install for dlib: started
      Running setup.py install for dlib: finished with status 'error'
      Complete output from command /opt/python/run/venv/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-T7rn2s/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-JqBH6P/install-record.txt --single-version-externally-managed --compile --install-headers /opt/python/run/venv/include/site/python2.7/dlib:
      running install
      running build
      running build_py
      package init file 'dlib/__init__.py' not found (or not a regular file)
      running build_ext
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/tmp/pip-install-T7rn2s/dlib/setup.py", line 257, in <module>
          'Topic :: Software Development',
        File "/opt/python/run/venv/local/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
          dist.run_commands()
        File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
          self.run_command(cmd)
        File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "/opt/python/run/venv/local/lib/python2.7/site-packages/setuptools/command/install.py", line 61, in run
          return orig.install.run(self)
        File "/usr/lib64/python2.7/distutils/command/install.py", line 604, in run
          self.run_command('build')
        File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
          self.distribution.run_command(command)
        File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "/usr/lib64/python2.7/distutils/command/build.py", line 127, in run
          self.run_command(cmd_name)
        File "/usr/lib64/python2.7/distutils/cmd.py", line 326, in run_command
          self.distribution.run_command(command)
        File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
          cmd_obj.run()
        File "/tmp/pip-install-T7rn2s/dlib/setup.py", line 127, in run
          cmake_version = self.get_cmake_version()
        File "/tmp/pip-install-T7rn2s/dlib/setup.py", line 123, in get_cmake_version
          "\n*******************************************************************\n")
      RuntimeError:
      *******************************************************************
       CMake must be installed to build the following extensions: dlib
      *******************************************************************

Here's my requirements.txt:

Flask==1.0.2
Flask_Cors==3.0.6
numpy==1.11.0
imutils==0.4.6
six==1.11.0
setuptools==39.1.0
enum34==1.1.6
futures==3.2.0
funcsigs==1.0.2
pbr==4.2.0
markdown==2.6.11
protobuf==3.6.1
werkzeug==0.14.1
wheel==0.31.1
absl-py==0.4.1
astor==0.7.1
backports.weakref==1.0.post1
gast==0.2.0
grpcio==1.15.0
mock==2.0.0
tensorboard==1.9.0
termcolor==1.1.0
tensorflow==1.9.0
Pillow==5.2.0
opencv_contrib_python==3.4.2.17
lxml==4.2.5
h5py==2.8.0
Cython==0.28.5
cmake==3.12.0
dlib==19.15.0
1

There are 1 answers

0
anujsyal On

Insall Cmake using yum in elastic beanstalk

packages:
  yum:
    libusb: []
    libusb-devel: []
    cmake: []