Can we reflect my package changes without running every time build?

I have installed a private code commit package in Nutmeg. Simply, I have cloned the repo at envtutor/env/build/openedx/requirements and added -e ./my_package_folder in private.txt. After that I have run tutor images build openedx and tutor local quickstart, and it’s working fine as expected.

But the problem is that whenever I make any changes to my custom package, Every time I have to run tutor images build openedx and tutor local quickstart. Because of this, it increases the deployment time.

And I have find few solution on the community. so, I have removed the package from envtutor/env/build/openedx/requirements and run the below steps.

These are the other approaches that I have taken:
1. I have mount the requirement. following steps I have taken

tutor local copyfrom lms /openedx/requirements $(tutor config printroot)/volumes/requirements
updated docker-compose.override.yml at envtutor/env/local
version: "3.7"
      - ../../volumes/requirements:/openedx/requirements
      - ../../volumes/requirements:/openedx/requirements
      - ../../volumes/requirements:/openedx/requirements

      - ../../volumes/requirements:/openedx/requirements
  • Clone the repo and added -e ./my_package_folder in private.txt at /envtutor/volumes/requirements
  • Run tutor images build openedx and tutor local quickstart but it doesn’t install the package.

2.Manually Installed the package

  • Go to lms bash tutor local exec lms bash
  • cd …/requirements/my_custom_package
  • Run pip install -e .
    -Package got installed in lms but not in lms worker and whenever I run image build and quickstart every time I have to run pip install -e . manually.

Do we have any solution without changing my edx-platform ?
Thanks in advance :grinning:

1 Like

The workflow for bind-mounting edx-platform in the “openedx” Docker sucks horribly is not great. This is a known issue that is being tracked here: Implictly mount and install edx-platform packages · Issue #177 · openedx/wg-developer-experience · GitHub

In the meantime, I suggest that you do not run local quickstart (or local launch in tutor v16). You probably don’t need to run init jobs every time, so tutor local start -d should be sufficient.

Also, if you run in “dev” mode (instead of “local”) with tutor dev start -d your requirement changes should be automatically picked up.