Skip to content

Commit

Permalink
chore: update default sandbox python version to latest 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
MoisesGSalas committed May 9, 2024
1 parent 9fc01b0 commit 5235ee2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tutorcodejail/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"ENABLE_K8S_DAEMONSET": False,
"ENFORCE_APPARMOR": True,
"HOST": "codejailservice",
"SANDBOX_PYTHON_VERSION": "3.8.6",
"SANDBOX_PYTHON_VERSION": "3.11.9",
"SKIP_INIT": False,
"LIMIT_CPU": "1",
"LIMIT_MEMORY": "1Gi",
Expand Down
7 changes: 3 additions & 4 deletions tutorcodejail/templates/codejail/build/codejail/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN $PYENV_ROOT/bin/pyenv install $CODEJAILSERVICE_PYTHON_VERSION

ARG SANDBOX_PYTHON_VERSION={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}
RUN git clone https://github.com/esinker/pyenv-version-alias $PYENV_ROOT/plugins/pyenv-alias
RUN VERSION_ALIAS={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}_sandbox $PYENV_ROOT/bin/pyenv install $SANDBOX_PYTHON_VERSION
RUN VERSION_ALIAS={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}_sandbox $PYENV_ROOT/bin/pyenv install -f $SANDBOX_PYTHON_VERSION

RUN $PYENV_ROOT/versions/$CODEJAILSERVICE_PYTHON_VERSION/bin/python -m venv /openedx/venv
RUN $PYENV_ROOT/versions/"$SANDBOX_PYTHON_VERSION"_sandbox/bin/python -m venv --copies /sandbox/venv
Expand Down Expand Up @@ -51,9 +51,8 @@ ENV VIRTUAL_ENV /sandbox/venv/
WORKDIR /var/tmp
RUN mkdir -p common/lib/

COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/requirements/edx-sandbox/py38.txt py38.txt
COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/requirements/edx-sandbox/releases/quince.txt releases/quince.txt
RUN pip3 install -r py38.txt
COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/requirements/edx-sandbox/base.txt base.txt
RUN pip3 install -r base.txt

# Allows you to add extra pip requirements to your codejail sandbox.
{% if CODEJAIL_EXTRA_PIP_REQUIREMENTS is defined %}
Expand Down

0 comments on commit 5235ee2

Please sign in to comment.