I want to do the following in a local development environment: create a common python virtual environment that can be mounted on tutor dev, but that can also be activated in my development environment such that i can install/uninstall packages from the command line and hack package source code, and, the open edx lms/cms/workers reflect these changes as i make them.
I’ve experimented with both of the following:
- create a literal copy of the virtual environment created from the openedx Dockerfile by using a command of the form
tutor dev copyfrom lms /openedx/venv ~
- create my own virtual environment by installing Python 3.8.12 and pip installing the necessary requirements files located in edx-platform/requirement/edx/
Either way, i’m mounting the virtual environment onto the containers with this command:
tutor dev start -d --mount=lms,lms-worker,lms-job:~/venv-openedx:/openedx/venv lms
When using the first approach i had to modify the pip and python executables as these are symlinks pointing to /opt/pyenv/versions/3.8.12/bin/python. I tried re-pointing the existing symlinks to the equivalent files on my file system but this breaks lms/cms. And, the 2nd approach results in a broken platform.
How are other edX developers approaching this?