Dlib wheel builds fine using github codespaces, but not when using streamlit community-cloud?

  × Building wheel for dlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [234 lines of output]
      running bdist_wheel
      running build
      running build_ext
      Building extension for Python 3.11.9 (main, Jun 13 2024, 06:35:24) [GCC 10.2.1 20210110]
      Invoking CMake setup: 'cmake /tmp/pip-install-vsu3nhig/dlib_9f3ab32038c6420da0da2b7c90a798f5/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-vsu3nhig/dlib_9f3ab32038c6420da0da2b7c90a798f5/build/lib.linux-x86_64-cpython-311 -DPYTHON_EXECUTABLE=/home/adminuser/venv/bin/python -DCMAKE_BUILD_TYPE=Release'
      -- The C compiler identification is GNU 10.2.1
      -- The CXX compiler identification is GNU 10.2.1
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- pybind11 v2.10.0
      -- Found PythonInterp: /home/adminuser/venv/bin/python (found suitable version "3.11.9", minimum required is "3.6")
      -- Found PythonLibs: /usr/local/lib/libpython3.11.so
      -- Performing Test HAS_FLTO
      -- Performing Test HAS_FLTO - Success
      -- Using CMake version: 3.18.4
      -- Compiling dlib version: 19.24.4
      -- SSE4 instructions can be executed by the host processor.
      -- AVX instructions can be executed by the host processor.
      -- Enabling AVX instructions
      -- Looking for pthread.h
      -- Looking for pthread.h - found
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
      -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
      -- Looking for pthread_create in pthreads
      -- Looking for pthread_create in pthreads - not found
      -- Looking for pthread_create in pthread
      -- Looking for pthread_create in pthread - found
      -- Found Threads: TRUE
      -- Found X11: /usr/include
      -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
      -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
      -- Looking for gethostbyname
      -- Looking for gethostbyname - found
      -- Looking for connect
      -- Looking for connect - found
      -- Looking for remove
      -- Looking for remove - found
      -- Looking for shmat
      -- Looking for shmat - found
      -- Looking for IceConnectionNumber in ICE
      -- Looking for IceConnectionNumber in ICE - found
      -- Found system copy of libpng: /usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so
      -- Searching for JPEG XL
      -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
      -- Checking for modules 'libjxl;libjxl_cms;libjxl_threads'
      --   No package 'libjxl' found
      --   No package 'libjxl_cms' found
      --   No package 'libjxl_threads' found
       *****************************************************************************
       *** No JPEG XL libraries found.                                           ***
       *** On Ubuntu 23.04 and newer you can install them by executing           ***
       ***    sudo apt install libjxl-dev                                        ***
       ***                                                                       ***
       *** Otherwise, you can find precompiled packages here:                    ***
       ***    https://github.com/libjxl/libjxl/releases                          ***
       *****************************************************************************
      -- Searching for BLAS and LAPACK
      -- Searching for BLAS and LAPACK
      -- Checking for module 'cblas'
      --   No package 'cblas' found
      -- Checking for module 'lapack'
      --   Found lapack, version 0.3.13+ds
      -- Looking for cblas_ddot
      -- Looking for cblas_ddot - not found
      -- Looking for sys/types.h
      -- Looking for sys/types.h - found
      -- Looking for stdint.h
      -- Looking for stdint.h - found
      -- Looking for stddef.h
      -- Looking for stddef.h - found
      -- Check size of void*
      -- Check size of void* - done
      -- Found OpenBLAS library
      -- Looking for sgetrf_single
      -- Looking for sgetrf_single - found
      -- Using OpenBLAS's built in LAPACK
      -- Looking for cblas_ddot
      -- Looking for cblas_ddot - found
      -- Looking for sgesv
      -- Looking for sgesv - not found
      -- Looking for sgesv_
      -- Looking for sgesv_ - not found
      CUDA_TOOLKIT_ROOT_DIR not found or specified
      -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
      -- Found CUDA, but CMake was unable to find the cuBLAS libraries that should be part of every basic CUDA install. Your CUDA install is somehow broken or incomplete. Since cuBLAS is required for dlib to use CUDA we won't use CUDA.
      -- DID NOT FIND CUDA
      -- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
      -- Searching for FFMPEG/LIBAV
      -- Checking for modules 'libavdevice;libavfilter;libavformat;libavcodec;libswresample;libswscale;libavutil'
      --   Found libavdevice, version 58.10.100
      --   Found libavfilter, version 7.85.100
      --   Found libavformat, version 58.45.100
      --   Found libavcodec, version 58.91.100
      --   Found libswresample, version 3.7.100
      --   Found libswscale, version 5.7.100
      --   Found libavutil, version 56.51.100
      -- Found FFMPEG/LIBAV via pkg-config in ``
      -- Configuring done
      -- Generating done
      -- Build files have been written to: /tmp/pip-install-vsu3nhig/dlib_9f3ab32038c6420da0da2b7c90a798f5/build/temp.linux-x86_64-cpython-311
      Invoking CMake build: 'cmake --build . --config Release -- -j16'
      Scanning dependencies of target dlib
      [  1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o
      [  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
      [  3%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o
      [  4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o
      [  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
      [  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
      [  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
      [  6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
      [  7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.cpp.o
      [  8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.cpp.o
      [  8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.cpp.o
      [  9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o
      [ 10%] Building CXX object dlib_build/CMakeFiles/dlib.dir/test_for_odr_violations.cpp.o
      [ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
      [ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/fft/fft.cpp.o
      [ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.cpp.o
      [ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.cpp.o
      [ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.cpp.o
      [ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o
      [ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.cpp.o
      [ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.cpp.o
      [ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.cpp.o
      [ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.cpp.o
      [ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.cpp.o
      [ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.cpp.o
      [ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.cpp.o
      [ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.cpp.o
      [ 21%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.cpp.o
      [ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.cpp.o
      [ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.cpp.o
      [ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.cpp.o
      [ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.cpp.o
      [ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.cpp.o
      [ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.cpp.o
      [ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.cpp.o
      [ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.cpp.o
      [ 28%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.cpp.o
      [ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.cpp.o
      [ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/async.cpp.o
      [ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.cpp.o
      [ 31%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.cpp.o
      [ 32%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/cpu_dlib.cpp.o
      [ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/cuda/tensor_tools.cpp.o
      [ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o
      [ 34%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/mnist.cpp.o
      [ 35%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/cifar.cpp.o
      [ 36%] Building CXX object dlib_build/CMakeFiles/dlib.dir/global_optimization/global_function_search.cpp.o
      [ 36%] Building CXX object dlib_build/CMakeFiles/dlib.dir/filtering/kalman_filter.cpp.o
      [ 37%] Building CXX object dlib_build/CMakeFiles/dlib.dir/svm/auto.cpp.o
      [ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/widgets.cpp.o
      [ 39%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/drawable.cpp.o
      [ 39%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/canvas_drawing.cpp.o
      [ 40%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/style.cpp.o
      [ 41%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/base_widgets.cpp.o
      [ 42%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_1.cpp.o
      [ 42%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_2.cpp.o
      [ 43%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/png_loader.cpp.o
      c++: fatal error: Killed signal terminated program cc1plus
      compilation terminated.
      gmake[2]: *** [dlib_build/CMakeFiles/dlib.dir/build.make:628: dlib_build/CMakeFiles/dlib.dir/cuda/tensor_tools.cpp.o] Error 1
      gmake[2]: *** Waiting for unfinished jobs....
      c++: fatal error: Killed signal terminated program cc1plus
      compilation terminated.
      gmake[2]: *** [dlib_build/CMakeFiles/dlib.dir/build.make:615: dlib_build/CMakeFiles/dlib.dir/cuda/cpu_dlib.cpp.o] Error 1
      c++: fatal error: Killed signal terminated program cc1plus
      compilation terminated.
      gmake[2]: *** [dlib_build/CMakeFiles/dlib.dir/build.make:706: dlib_build/CMakeFiles/dlib.dir/svm/auto.cpp.o] Error 1
      c++: fatal error: Killed signal terminated program cc1plus
      compilation terminated.
      gmake[2]: *** [dlib_build/CMakeFiles/dlib.dir/build.make:719: dlib_build/CMakeFiles/dlib.dir/gui_widgets/widgets.cpp.o] Error 1
      gmake[1]: *** [CMakeFiles/Makefile2:163: dlib_build/CMakeFiles/dlib.dir/all] Error 2
      gmake: *** [Makefile:103: all] Error 2
      Traceback (most recent call last):
        File "/home/adminuser/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/adminuser/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/adminuser/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 410, in build_wheel
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 395, in _build_with_temp_dir
          self.run_setup()
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 220, in <module>
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 184, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
          dist.run_commands()
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 368, in run
          self.run_command("build")
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
          self.distribution.run_command(command)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 968, in run_command
          super().run_command(command)
        File "/tmp/pip-build-env-rxx_o6fv/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 130, in run
        File "<string>", line 170, in build_extension
        File "/usr/local/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j16']' returned non-zero exit status 2.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dlib
  Building wheel for face-recognition-models (setup.py): started
  Building wheel for face-recognition-models (setup.py): finished with status 'done'
  Created wheel for face-recognition-models: filename=face_recognition_models-0.3.0-py2.py3-none-any.whl size=100566163 sha256=d729ebc5a1412c9441e55ffee0581adc72bdcdfb5c39dae5f573a6d689f2655f
  Stored in directory: /tmp/pip-ephem-wheel-cache-ik91jhx8/wheels/04/52/ec/9355da79c29f160b038a20c784db2803c2f9fa2c8a462c176a
Successfully built face-recognition-models
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
Checking if Streamlit is installed

change dlib to dlib-bin in requirements.txt and try again