diff --git a/Dockerfile b/Dockerfile index 0206588..20a48bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM almalinux:8 RUN dnf -y install epel-release && \ - dnf -y upgrade ca-certificates --disablerepo=epel && \ - rpm -i http://dist.eugridpma.info/distribution/igtf/1.125/accredited/RPMS/ca_COMODO-RSA-CA-1.125-1.noarch.rpm && \ - rpm -i http://dist.eugridpma.info/distribution/igtf/1.125/accredited/RPMS/ca_InCommon-IGTF-Server-CA-1.125-1.noarch.rpm && \ - dnf install -y python3-pip && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - pip3 install 'elasticsearch>=6.0.0,<7.0.0' 'elasticsearch-dsl>=6.0.0,<7.0.0' htcondor requests prometheus_client + yum install -y https://repo.opensciencegrid.org/osg/23-main/osg-23-main-el8-release-latest.rpm && \ + yum install -y osg-ca-certs && \ + dnf install -y python38 python38-pip && \ + dnf clean all && yum clean all && \ + ln -s /usr/bin/python3.8 /usr/bin/python && \ + pip3.8 install --no-cache-dir 'elasticsearch>=6.0.0,<7.0.0' 'elasticsearch-dsl>=6.0.0,<7.0.0' htcondor requests prometheus_client COPY . /monitoring diff --git a/condor_utils.py b/condor_utils.py index b0f761b..4b9672f 100644 --- a/condor_utils.py +++ b/condor_utils.py @@ -741,7 +741,7 @@ def read_from_file(filename): Args: filename (str): filename to read """ - with (gzip.open(filename) if filename.endswith('.gz') else open(filename)) as f: + with (gzip.open(filename, 'rt', encoding='utf-8') if filename.endswith('.gz') else open(filename)) as f: entry = '' for line in f.readlines(): if line.startswith('***'):