enhancement: upgrade python version to 3
.12.2
This commit is contained in:
parent
96d6ba9ca2
commit
213e4dbc0d
@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked \
|
||||
apt update && \
|
||||
apt install -y curl git-core gettext language-pack-en python3 python3-dev python3-pip python3-venv \
|
||||
apt install -y curl git-core gettext language-pack-en \
|
||||
build-essential libcairo2 libffi-dev libmysqlclient-dev libxml2-dev libxslt-dev libjpeg-dev libssl-dev \
|
||||
pkg-config
|
||||
ENV LC_ALL en_US.UTF-8
|
||||
@ -27,15 +27,26 @@ WORKDIR /openedx/discovery
|
||||
RUN echo "{}" > /openedx/config.yml
|
||||
ENV DISCOVERY_CFG /openedx/config.yml
|
||||
|
||||
# Install python venv
|
||||
RUN python3 -m venv ../venv/
|
||||
# Install pyenv
|
||||
# https://www.python.org/downloads/
|
||||
# https://github.com/pyenv/pyenv/releases
|
||||
ARG PYTHON_VERSION=3.12.2
|
||||
ENV PYENV_ROOT /opt/pyenv
|
||||
USER root
|
||||
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.36 --depth 1
|
||||
# Install Python
|
||||
RUN $PYENV_ROOT/bin/pyenv install $PYTHON_VERSION
|
||||
USER app
|
||||
|
||||
# Create virtualenv
|
||||
RUN $PYENV_ROOT/versions/$PYTHON_VERSION/bin/python -m venv /openedx/venv
|
||||
ENV PATH "/openedx/venv/bin:$PATH"
|
||||
|
||||
RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
|
||||
# https://pypi.org/project/setuptools/
|
||||
# https://pypi.org/project/pip/
|
||||
# https://pypi.org/project/wheel/
|
||||
setuptools==68.2.2 pip==23.2.1. wheel==0.41.2
|
||||
setuptools==69.1.1 pip==24.0 wheel==0.43.0
|
||||
|
||||
# Install a recent version of nodejs
|
||||
RUN pip install nodeenv==1.8.0
|
||||
@ -61,7 +72,7 @@ RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared pip install \
|
||||
# Use redis as a django cache https://pypi.org/project/django-redis/
|
||||
django-redis==5.4.0 \
|
||||
# uwsgi server https://pypi.org/project/uWSGI/
|
||||
uwsgi==2.0.22
|
||||
uwsgi==2.0.24
|
||||
|
||||
{% if DISCOVERY_ATLAS_PULL %}
|
||||
# Pull translations. Support the OEP-58 proposal behind a feature flag until it's fully implemented.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user