feat: extra pip requirements

This commit is contained in:
Navin Karkera 2023-04-21 16:19:18 +05:30 committed by Régis Behmo
parent a8f8e064aa
commit 38a538a675
3 changed files with 16 additions and 0 deletions

View File

@ -73,6 +73,18 @@ Then::
This last step should be performed every time you create new or make changes to existing programs.
Install extra requirements
~~~~~~~~~~~~~~~~~~~~~~~~~~
In order to install extra requirements, use DISCOVERY_EXTRA_PIP_REQUIREMENTS and re-build the docker image.::
tutor config save \
--set 'DISCOVERY_EXTRA_PIP_REQUIREMENTS=["git+https://github.com/myusername/myplugin"]'
Then, build the image, pointing to your fork if necessary::
tutor images build discovery
Debugging
---------

View File

@ -28,6 +28,7 @@ config = {
"OAUTH2_KEY_SSO": "discovery-sso",
"OAUTH2_KEY_SSO_DEV": "discovery-sso-dev",
"CACHE_REDIS_DB": "{{ OPENEDX_CACHE_REDIS_DB }}",
"EXTRA_PIP_REQUIREMENTS": [],
},
}

View File

@ -38,6 +38,9 @@ ENV PATH /openedx/nodeenv/bin:${PATH}
# This is identical to "make production-requirements" but it was split in multiple
# instructions to benefit from docker image caching
RUN pip install -r requirements.txt
{% for extra_requirements in DISCOVERY_EXTRA_PIP_REQUIREMENTS %}RUN pip install '{{ extra_requirements }}'
{% endfor %}
ARG NPM_REGISTRY={{ NPM_REGISTRY }}
RUN npm install --verbose --registry=$NPM_REGISTRY --production
RUN ./node_modules/.bin/bower install --allow-root --production