@@ -6,9 +6,9 @@ ENV DEBIAN_FRONTEND=noninteractive
66RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
77 --mount=type=cache,target=/var/lib/apt,sharing=locked \
88 apt update && \
9- apt install -y curl git-core gettext language-pack-en python3 python3-dev python3-pip python3-venv \
9+ apt install -y curl git-core gettext language-pack-en \
1010 build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
11- pkg-config
11+ pkg-config libsqlite3-dev mime-support
1212ENV LC_ALL en_US.UTF-8
1313
1414ARG APP_USER_ID=1000
@@ -27,15 +27,27 @@ WORKDIR /openedx/discovery
2727RUN echo "{}" > /openedx/config.yml
2828ENV DISCOVERY_CFG /openedx/config.yml
2929
30- # Install python venv
31- RUN python3 -m venv ../venv/
30+ # Install pyenv
31+ # https://www.python.org/downloads/
32+ # https://github.com/pyenv/pyenv/releases
33+ ARG PYTHON_VERSION=3.12.2
34+ ENV PYENV_ROOT /opt/pyenv
35+ # root user is required for below 2 steps, as app user gets permission denied.
36+ USER root
37+ RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1
38+ # Install Python
39+ RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION
40+ USER app
41+
42+ # Create virtualenv
43+ RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv
3244ENV PATH "/openedx/venv/bin:$PATH"
3345
3446RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
3547 # https://pypi.org/project/setuptools/
3648 # https://pypi.org/project/pip/
3749 # https://pypi.org/project/wheel/
38- setuptools==68.2.2 pip==23.2.1. wheel==0.41.2
50+ setuptools==69.1.1 pip==24.0 wheel==0.43.0
3951
4052# Install a recent version of nodejs
4153RUN pip install nodeenv==1.8.0
@@ -61,7 +73,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
6173 # Use redis as a django cache https://pypi.org/project/django-redis/
6274 django-redis==5.4.0 \
6375 # uwsgi server https://pypi.org/project/uWSGI/
64- uwsgi==2.0.22
76+ uwsgi==2.0.24
6577
6678{% if DISCOVERY_ATLAS_PULL %}
6779# Pull translations. Support the OEP-58 proposal behind a feature flag until it's fully implemented.
0 commit comments