Problem with installing custom requirements

I have custom django app inside edxplatform which has it’s own python dependencies described in requirements.txt. I want to make these dependencies to be installed on my local devstack environment. To do that I am following this guidelines.

I tried to temporarily modify the main service command in docker-compose.yml:

    command: bash -c 'source /edx/app/edxapp/edxapp_env && pip install -r /edx/app/edxapp/edx-platform/openedx/features/project_name/requirements.txt && while true; do python /edx/app/edxapp/edx-platform/ lms runserver --settings devstack_docker; sleep 2; done'

I stop all containers, delete images and volumes. Run make dev.pull.lms.

Then I run provision command make dev.provision.lms. It does install requirements but then fails on stage:

# Run edxapp migrations first since they are needed for the service users and OAuth clients
docker-compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_db --settings devstack_docker'

Also I tried to add requirements installation directly to Dockerfile, then build the image with the same release name. But result is the same, only it fails on next provision stage:

# Create static assets for both LMS and Studio
for app in "${apps[@]}"; do
    docker-compose exec -T $app bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_assets --settings devstack_docker'


++ docker-compose restart lms
Restarting edx.devstack-lilac.master.lms ... done
++ docker-compose exec -T lms bash -c 'source /edx/app/edxapp/edxapp_env && cd /edx/app/edxapp/edx-platform && paver update_db --settings devstack_docker'
---> pavelib.servers.update_db
---> pavelib.prereqs.install_prereqs
---> pavelib.prereqs.install_node_prereqs
Node prereqs unchanged, skipping...
---> pavelib.prereqs.install_python_prereqs
---> pavelib.prereqs.uninstall_python_packages
NO_PYTHON_UNINSTALL is set. No attempts will be made to uninstall old Python libs.
Python prereqs unchanged, skipping...
pip freeze > /edx/app/edxapp/edx-platform/test_root/log/pip_freeze.log
* WARNING: Mac users should run this from both the lms and studio shells
* in docker devstack to avoid startup errors that kill your CPU.
* For more details, see:
NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE=devstack_docker /edx/bin/edxapp-migrate-lms --traceback --pythonpath=. 
2022-04-28 08:49:54,152 WARNING 91 [py.warnings] [user None] [ip None] - /edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/newrelic/ DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
  prototype = wrapper.__name__[3:] + ' ' + inspect.formatargspec(

2022-04-28 08:49:54,269 WARNING 91 [py.warnings] [user None] [ip None] - /edx/app/edxapp/edx-platform/lms/djangoapps/course_wiki/plugins/markdownedx/ DeprecationWarning: 'etree' is deprecated. Use 'xml.etree.ElementTree' instead.
  from lms.djangoapps.course_wiki.plugins.markdownedx import mdx_mathjax, mdx_video

Traceback (most recent call last):
  File "", line 120, in <module>
  File "/edx/app/edxapp/edx-platform/lms/", line 20, in run
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/", line 24, in setup
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/apps/", line 91, in populate
    app_config = AppConfig.create(entry)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/apps/", line 90, in create
    module = import_module(entry)
  File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/importlib/", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'dal'

Please help me to properly configure custom requirements installation?