Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Redwood #53

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ __pycache__/
TODO
# Distribution / packaging
.Python
build/
/build/
develop-eggs/
dist/
downloads/
Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def load_about():
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
python_requires=">=3.8",
install_requires=["tutor>=17.0.2, <18"],
install_requires=["tutor>=17.0.2, <19"],
entry_points={"tutor.plugin.v1": ["codejail = tutorcodejail.plugin"]},
classifiers=[
"Development Status :: 3 - Alpha",
Expand All @@ -55,5 +55,7 @@ def load_about():
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
)
2 changes: 1 addition & 1 deletion tutorcodejail/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Helps you keep your cool when creating dozens of open edX and eduNEXT environments."""
__version__ = "17.0.1"
__version__ = "18.0.0"
3 changes: 2 additions & 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 All @@ -30,6 +30,7 @@
"MIN_REPLICAS": 1,
"MAX_REPLICAS": 4,
"AVG_CPU": 65,
"SERVICE_VERSION": "main",
},
"overrides": {},
}
Expand Down
14 changes: 7 additions & 7 deletions tutorcodejail/templates/codejail/build/codejail/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ RUN apt update && \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git subversion
ENV PYENV_ROOT /opt/pyenv
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.3.5 --depth 1
RUN git clone https://github.com/pyenv/pyenv $PYENV_ROOT --branch v2.4.0 --depth 1

ARG CODEJAILSERVICE_PYTHON_VERSION=3.8.6
ARG CODEJAILSERVICE_PYTHON_VERSION=3.11.9
RUN $PYENV_ROOT/bin/pyenv install $CODEJAILSERVICE_PYTHON_VERSION

ARG SANDBOX_PYTHON_VERSION={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}
RUN git clone https://github.com/s1341/pyenv-alias.git $PYENV_ROOT/plugins/pyenv-alias
RUN VERSION_ALIAS={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}_sandbox $PYENV_ROOT/bin/pyenv install $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 -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

###### Codejail service code
FROM minimal as code
RUN git clone https://github.com/eduNEXT/codejailservice.git --branch {{ CODEJAIL_VERSION }} --depth 1 /openedx/codejailservice
RUN git clone https://github.com/eduNEXT/codejailservice.git --branch {{ CODEJAIL_SERVICE_VERSION }} --depth 1 /openedx/codejailservice
WORKDIR /openedx/codejailservice

###### Install python requirements in virtualenv
Expand All @@ -51,8 +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
RUN pip3 install -r py38.txt
COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/requirements/edx-sandbox/releases/redwood.txt redwood.txt
RUN pip3 install -r redwood.txt

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