<commit_before># This file is part of REANA.
# Copyright (C) 2017, 2018, 2019, 2020 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

# Install base image and its dependencies
FROM python:3.8-slim
RUN apt-get update && \
    apt-get install -y vim-tiny && \
    pip install --upgrade pip

# Install Kerberos dependencies
RUN export DEBIAN_FRONTEND=noninteractive ;\
    apt-get -yq install krb5-user \
                        krb5-config \
                        libkrb5-dev \
                        libauthen-krb5-perl \
                        gcc;
ADD etc/krb5.conf /etc/krb5.conf

# Default compute backend is Kubernetes
ARG COMPUTE_BACKENDS=kubernetes

# CERN HTCondor part taken from https://gitlab.cern.ch/batch-team/condorsubmit
RUN if echo "$COMPUTE_BACKENDS" | grep -q "htcondorcern"; then \
      export DEBIAN_FRONTEND=noninteractive ;\
      apt-get -yq install wget alien gnupg2 ;\
      wget -O ngbauth-submit.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/ngbauth-submit-0.23-1.el7.noarch.rpm; \
      wget -O myschedd.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/myschedd-1.5-1.el7.x86_64.rpm; \
      yes | alien -i myschedd.rpm; \
      yes | alien -i ngbauth-submit.rpm; \
      wget -qO - http://research.cs.wisc.edu/htcondor/debian/HTCondor-Release.gpg.key | apt-key add -; \
      echo "deb https://research.cs.wisc.edu/htcondor/debian/8.9/buster buster contrib" >>/etc/apt/sources.list; \
      apt-get update; \
      apt-get install -y condor --no-install-recommends; \
      apt-get -y remove gnupg2 wget alien; \
    fi

# CERN Slurm backend requires SSH to headnode
RUN if echo "$COMPUTE_BACKENDS" | grep -q "slurmcern"; then \
      export DEBIAN_FRONTEND=noninteractive ;\
      apt-get -yq install openssh-client \
                          --no-install-recommends; \
    fi

# Add HTCondor related files
RUN mkdir -p /etc/myschedd
ADD etc/myschedd.yaml /etc/myschedd/
ADD etc/10_cernsubmit.config /etc/condor/config.d/
ADD etc/ngbauth-submit /etc/sysconfig/
ADD etc/ngauth_batch_crypt_pub.pem /etc/
ADD etc/cerngridca.crt /usr/local/share/ca-certificates/cerngridca.crt
ADD etc/cernroot.crt /usr/local/share/ca-certificates/cernroot.crt
ADD etc/job_wrapper.sh etc/job_wrapper.sh<commit_msg>dockerfile: exit on myschedd installation errors<commit_after># This file is part of REANA.
# Copyright (C) 2017, 2018, 2019, 2020 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.

# Install base image and its dependencies
FROM python:3.8-slim
RUN apt-get update && \
    apt-get install -y vim-tiny && \
    pip install --upgrade pip

# Install Kerberos dependencies
RUN export DEBIAN_FRONTEND=noninteractive ;\
    apt-get -yq install krb5-user \
                        krb5-config \
                        libkrb5-dev \
                        libauthen-krb5-perl \
                        gcc;
ADD etc/krb5.conf /etc/krb5.conf

# Default compute backend is Kubernetes
ARG COMPUTE_BACKENDS=kubernetes

# CERN HTCondor part taken from https://gitlab.cern.ch/batch-team/condorsubmit
RUN if echo "$COMPUTE_BACKENDS" | grep -q "htcondorcern"; then \
      set -e;\
      export DEBIAN_FRONTEND=noninteractive ;\
      apt-get -yq install wget alien gnupg2 ;\
      wget -O ngbauth-submit.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/ngbauth-submit-0.23-1.el7.noarch.rpm; \
      wget -O myschedd.rpm http://linuxsoft.cern.ch/internal/repos/batch7-stable/x86_64/os/Packages/myschedd-1.5-1.el7.x86_64.rpm; \
      yes | alien -i myschedd.rpm; \
      yes | alien -i ngbauth-submit.rpm; \
      wget -qO - http://research.cs.wisc.edu/htcondor/debian/HTCondor-Release.gpg.key | apt-key add -; \
      echo "deb https://research.cs.wisc.edu/htcondor/debian/8.9/buster buster contrib" >>/etc/apt/sources.list; \
      apt-get update; \
      apt-get install -y condor --no-install-recommends; \
      apt-get -y remove gnupg2 wget alien; \
    fi

# CERN Slurm backend requires SSH to headnode
RUN if echo "$COMPUTE_BACKENDS" | grep -q "slurmcern"; then \
      export DEBIAN_FRONTEND=noninteractive ;\
      apt-get -yq install openssh-client \
                          --no-install-recommends; \
    fi

# Add HTCondor related files
RUN mkdir -p /etc/myschedd
ADD etc/myschedd.yaml /etc/myschedd/
ADD etc/10_cernsubmit.config /etc/condor/config.d/
ADD etc/ngbauth-submit /etc/sysconfig/
ADD etc/ngauth_batch_crypt_pub.pem /etc/
ADD etc/cerngridca.crt /usr/local/share/ca-certificates/cerngridca.crt
ADD etc/cernroot.crt /usr/local/share/ca-certificates/cernroot.crt
ADD etc/job_wrapper.sh etc/job_wrapper.sh
{'fraction_non_alphanumeric': 0.11157196184155951, 'fraction_numerical': 0.02198257984238905, 'mean_word_length': 2.6154422788605696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7334071', 'n_tokens_mistral': 1823, 'n_tokens_neox': 1705, 'n_words': 398}