mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 14:43:03 +00:00
Install python requirements in venv in docker image
Installing the requirements in a virtualenv is necessary to run "pip install ..." commands in development mode, when the USERID is != 0.
This commit is contained in:
parent
b7c31d770f
commit
3e5e494bd8
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## Latest
|
## Latest
|
||||||
|
|
||||||
|
- [Improvement] Install python requirements in virtual env in docker image
|
||||||
- [Bugfix] Add missing volume for theme development
|
- [Bugfix] Add missing volume for theme development
|
||||||
- [Improvement] Rename "config [non]interactive" command to "config save [--silent]"
|
- [Improvement] Rename "config [non]interactive" command to "config save [--silent]"
|
||||||
- [Improvement] More explicit logging during environment generation
|
- [Improvement] More explicit logging during environment generation
|
||||||
|
@ -43,7 +43,7 @@ In order to run a fork of edx-platform, dependencies need to be properly install
|
|||||||
|
|
||||||
export TUTOR_EDX_PLATFORM_PATH=/path/to/edx-platform
|
export TUTOR_EDX_PLATFORM_PATH=/path/to/edx-platform
|
||||||
tutor dev run lms npm install
|
tutor dev run lms npm install
|
||||||
tutor dev run lms pip install --src ../venv/src --requirement requirements/edx/development.txt
|
tutor dev run lms pip install --requirement requirements/edx/development.txt
|
||||||
tutor dev run lms python setup.py install
|
tutor dev run lms python setup.py install
|
||||||
tutor dev run lms openedx-assets build
|
tutor dev run lms openedx-assets build
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ Watch the themes folders for changes (in a different terminal)::
|
|||||||
|
|
||||||
tutor dev watchthemes
|
tutor dev watchthemes
|
||||||
|
|
||||||
Make changes to some of the files inside your theme directory: the theme assets should be automatically recompiled and visible at http://localhost:8000.
|
Make changes to some of the files inside the theme directory: the theme assets should be automatically recompiled and visible at http://localhost:8000.
|
||||||
|
|
||||||
Assets management
|
Assets management
|
||||||
-----------------
|
-----------------
|
||||||
|
@ -6,7 +6,7 @@ MAINTAINER Régis Behmo <regis@behmo.com>
|
|||||||
# Install system requirements
|
# Install system requirements
|
||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
# Global requirements
|
# Global requirements
|
||||||
apt install -y language-pack-en git python-virtualenv build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++ \
|
apt install -y language-pack-en git python-virtualenv build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-virtualenv libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++ \
|
||||||
# openedx requirements
|
# openedx requirements
|
||||||
gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libsqlite3-dev libxml2-dev libxmlsec1-dev libxslt1-dev lynx nodejs npm ntp pkg-config \
|
gettext gfortran graphviz graphviz-dev libffi-dev libfreetype6-dev libgeos-dev libjpeg8-dev liblapack-dev libpng12-dev libsqlite3-dev libxml2-dev libxmlsec1-dev libxslt1-dev lynx nodejs npm ntp pkg-config \
|
||||||
# Our requirements
|
# Our requirements
|
||||||
@ -36,12 +36,15 @@ RUN cd /tmp \
|
|||||||
# Install python requirements (clone source repos in a separate dir, otherwise
|
# Install python requirements (clone source repos in a separate dir, otherwise
|
||||||
# they will be overwritten when we mount edx-platform)
|
# they will be overwritten when we mount edx-platform)
|
||||||
ENV NO_PYTHON_UNINSTALL 1
|
ENV NO_PYTHON_UNINSTALL 1
|
||||||
RUN pip install --src ../venv/src -r requirements/edx/base.txt
|
RUN virtualenv /openedx/venv
|
||||||
RUN pip install --src ../venv/src -r requirements/edx/development.txt
|
ENV PATH /openedx/venv/bin:${PATH}
|
||||||
|
ENV VIRTUAL_ENV /openedx/venv/
|
||||||
|
RUN pip install setuptools==39.0.1 pip==9.0.3
|
||||||
|
RUN pip install -r requirements/edx/development.txt
|
||||||
|
|
||||||
# Install patched version of ora2
|
# Install patched version of ora2
|
||||||
RUN pip uninstall -y ora2 && \
|
RUN pip uninstall -y ora2 && \
|
||||||
pip install --src ../venv/src git+https://github.com/regisb/edx-ora2.git@open-release/hawthorn.2#egg=ora2==2.1.17
|
pip install git+https://github.com/regisb/edx-ora2.git@open-release/hawthorn.2#egg=ora2==2.1.17
|
||||||
|
|
||||||
# Install a recent version of nodejs
|
# Install a recent version of nodejs
|
||||||
RUN nodeenv /openedx/nodeenv --node=8.9.3 --prebuilt
|
RUN nodeenv /openedx/nodeenv --node=8.9.3 --prebuilt
|
||||||
|
Loading…
Reference in New Issue
Block a user