Skip to content

Commit

Permalink
Merge pull request #770 from UCL-INGI/update_container
Browse files Browse the repository at this point in the history
Update containers distribution to EL8
  • Loading branch information
Drumor committed Jan 20, 2022
2 parents 6ede62c + b13cd95 commit b5794b8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
31 changes: 15 additions & 16 deletions base-containers/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# DOCKER-VERSION 1.1.0
FROM centos:7
FROM rockylinux:8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
Expand All @@ -8,14 +8,13 @@ ENV LC_ALL en_US.UTF-8
LABEL org.inginious.grading.agent_version=3

# Install python, needed for scripts used in INGInious + locale support
RUN yum clean metadata && \
yum -y install epel-release && \
yum -y upgrade && \
yum -y install python python36-pip python36 python36-devel zip unzip tar sed openssh-server openssl bind-utils iproute file jq && \
pip3.6 install msgpack pyzmq jinja2 PyYAML timeout-decorator ipython mypy && \
sed -i "s/override_install_langs=en_US.utf8/#override_install_langs=en_US.utf8/g" /etc/yum.conf && \
yum -y reinstall glibc-common && \
yum clean all
RUN dnf clean metadata && \
dnf -y install langpacks-en && \
dnf -y install epel-release && \
dnf -y upgrade && \
dnf -y install python38 python38-pip python38-devel zip unzip tar sed openssh-server openssl bind-utils iproute file jq procps-ng && \
pip3.8 install msgpack pyzmq jinja2 PyYAML timeout-decorator ipython mypy && \
dnf clean all

# Allow to run commands
ADD . /INGInious
Expand All @@ -25,14 +24,14 @@ RUN chmod -R 755 /INGInious/bin && \

# Install everything needed to allow INGInious' python libs to be loaded
RUN chmod -R 644 /INGInious/inginious_container_api && \
mkdir -p /usr/lib/python3.6/site-packages/inginious_container_api && \
cp -R /INGInious/inginious_container_api/*.py /usr/lib/python3.6/site-packages/inginious_container_api && \
echo "inginious_container_api" > /usr/lib/python3.6/site-packages/inginious_container_api.pth
mkdir -p /usr/lib/python3.8/site-packages/inginious_container_api && \
cp -R /INGInious/inginious_container_api/*.py /usr/lib/python3.8/site-packages/inginious_container_api && \
echo "inginious_container_api" > /usr/lib/python3.8/site-packages/inginious_container_api.pth

# This maintains backward compatibility
RUN mkdir -p /usr/lib/python3.6/site-packages/inginious && \
cp -R /INGInious/inginious_container_api/*.py /usr/lib/python3.6/site-packages/inginious && \
echo "inginious" > /usr/lib/python3.6/site-packages/inginious.pth
RUN mkdir -p /usr/lib/python3.8/site-packages/inginious && \
cp -R /INGInious/inginious_container_api/*.py /usr/lib/python3.8/site-packages/inginious && \
echo "inginious" > /usr/lib/python3.8/site-packages/inginious.pth

# Delete unneeded folders
RUN rm -R /INGInious
Expand All @@ -42,7 +41,7 @@ RUN groupadd --gid 4242 worker && \
useradd --uid 4242 --gid 4242 worker --home-dir /task

# Set locale params for SSH debug
RUN echo -e "export LANG=en_US.UTF-8\nexport LANGUAGE=en_US:en\nexport LC_ALL=en_US.UTF-8\n" > /etc/profile
RUN echo -e "LANG=en_US.UTF-8\nLANGUAGE=en_US:en\nLC_ALL=en_US.UTF-8" >> /etc/environment
RUN sed -i.bak '/^AcceptEnv/ d' /etc/ssh/sshd_config

CMD ["INGInious"]
2 changes: 1 addition & 1 deletion base-containers/base/bin/_run_student_intern
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! /bin/python3.6
#! /bin/python3
# -*- coding: utf-8 -*-
#
# This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for
Expand Down

0 comments on commit b5794b8

Please sign in to comment.