Tutor is based on Docker images, which means that each time you run the LMS or any other component, it will run the latest image. When you run tutor local run lms bash, it creates a temporary container using the image, which is completely separate from any other container thatâs running the LMS. Whatever changes you make in this âbashâ container will be lost as soon as you exit the bash shell, because youâre not modifying the image itself, just the temporary container filesystem which was based on that image.
If you want to make changes to edx-platform, you should run tutor in dev mode and use bind mounts to share the edx-platform directory from your host with tutor. For example:
tutor dev start --mount=/path/to/edx-platform lms
and then when you can open edx-platform on your host computer, and when you make changes, you should see that it automatically reloads and you can test the new changes. Review the documentation for more details and examples.
If you are trying to make changes to deploy in production, the process is different: you need to configure tutor to use your customized version of edx-platform, and then use the tutor images build command to build the images that you want to deploy in production.
Thanks @braden for this additional context. Iâm getting started with using tutor locally on my macbook for development and am seeing unexpected results when i try to follow tutorâs mount instructions.
I was expecting that the following commands âŠ
tutor dev copyfrom lms /openedx/venv ~
mv ~/venv ~/venv-openedx
tutor dev start -d --mount=lms,lms-worker,lms-job,cms,cms-worker,cms-job:~/venv-openedx:/openedx/venv lms
would result in the following:
Create a copy of the original openedx virtual environment
Restart the dev environment, mounting the copy of the virtual environment to /openedx/venv/
However, the following simple test suggests that the mount is not working.
The file that i touched in the copy of the virtual environment is not visible from inside of the bash container. Taking into consideration your comments above, shouldnât the bash container also include the mounted copy of the virtual environment, and thus shouldnât it also show the touched test file?
You are correct, as far as I understand. The only part where Iâm a little fuzzy is whether the dev containers are actually restarted, or you need to manually stop them prior to running the start -d --mount=... command. There should be some information about this in the docker compose logs, in the form of âRestarting container âŠâ.
Also, Tutor should print the bind-mounted volumes, in the form of âBind-mount: {host_path} â {container_path} in {service}â.
Finally, you can verify which volumes are mounted by running: docker inspect <container id>>.