Я пытаюсь развернуть AWS лямбда-функцию, используя бессерверную структуру со средой выполнения python3 .7, и мне нужно упаковать dlib как зависимость и импортировать внутри лямбда-функции. Есть идеи, какой самый простой способ заставить dlib работать на python3 .7 и успешно упаковывать с использованием бессерверной структуры? TIA ...
ОБНОВЛЕНИЕ: Я уже добавил dlib == 19.9.0 в свой файл requirements.txt, я использую Serverless plugin serverless- python -requirements, и я развертываю его, используя конвейер битбакета на основе образа ubuntu с python и базой узлов. Я также устанавливаю cmake в сценарий конвейера, так как dlib нуждается в его компиляции, как я видел. следующие повторяющиеся предупреждения об устаревании, пока конвейер не превысит объем памяти и не остановится с ошибкой:
Scanning dependencies of target dlib
.
.
[ 77%] Building CXX object CMakeFiles/dlib_python.dir/src/other.cpp.o
In file included from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/cast.h:16,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/attr.h:13,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/pybind11.h:43,
from /tmp/pip-install-nx1hok9_/dlib/dlib/../dlib/python/pybind_utils.h:6,
from /tmp/pip-install-nx1hok9_/dlib/dlib/../dlib/python.h:6,
from /tmp/pip-install-nx1hok9_/dlib/tools/python/src/basic.cpp:3:
/tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/detail/internals.h:82:34: warning: ‘int PyThread_create_key()’ is deprecated [-Wdeprecated-declarations]
decltype(PyThread_create_key()) tstate = 0; // Usually an int but a long on Cygwin64 with Python 3.x
^
In file included from /usr/local/include/python3.7m/pystate.h:11,
from /usr/local/include/python3.7m/traceback.h:8,
from /usr/local/include/python3.7m/Python.h:119,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/detail/common.h:111,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/pytypes.h:12,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/cast.h:13,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/attr.h:13,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/pybind11.h:43,
from /tmp/pip-install-nx1hok9_/dlib/dlib/../dlib/python/pybind_utils.h:6,
from /tmp/pip-install-nx1hok9_/dlib/dlib/../dlib/python.h:6,
from /tmp/pip-install-nx1hok9_/dlib/tools/python/src/basic.cpp:3:
/usr/local/include/python3.7m/pythread.h:95:17: note: declared here
PyAPI_FUNC(int) PyThread_create_key(void) Py_DEPRECATED(3.7);
^~~~~~~~~~~~~~~~~~~
In file included from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/cast.h:16,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/attr.h:13,
from /tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/pybind11.h:43,
from /tmp/pip-install-nx1hok9_/dlib/dlib/../dlib/python/pybind_utils.h:6,
from /tmp/pip-install-nx1hok9_/dlib/dlib/../dlib/python.h:6,
from /tmp/pip-install-nx1hok9_/dlib/tools/python/src/basic.cpp:3:
/tmp/pip-install-nx1hok9_/dlib/dlib/external/pybind11/include/pybind11/detail/internals.h:82:34: warning: ‘int PyThread_create_key()’ is deprecated [-Wdeprecated-declarations]
decltype(PyThread_create_key()) tstate = 0; // Usually an int but a long on Cygwin64 with Python 3.x
^
In file included from /usr/local/include/python3.7m/pystate.h:11,
введите код здесь