Skip to content

Commit

Permalink
Move integration tests docker image to be based on RHEL9
Browse files Browse the repository at this point in the history
  • Loading branch information
rosswhitfield committed Dec 8, 2023
1 parent 8ec79a3 commit 108e370
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion postprocessing/Configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, config_file):
config["dev_output_dir"].strip() if "dev_output_dir" in config else ""
)
self.python_executable = (
config["python_exec"] if "python_exec" in config else "python"
config["python_exec"] if "python_exec" in config else "python3"
)

self.max_procs = config["max_procs"] if "max_procs" in config else 5
Expand Down
4 changes: 2 additions & 2 deletions postprocessing/PostProcessAdmin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Post-processing tasks
Expand Down Expand Up @@ -121,7 +121,7 @@ def reduce(self):
f"{self.instrument}_{self.proposal}_runsummary.csv",
)
cmd = (
"python "
"python3 "
+ summary_script
+ " "
+ self.instrument
Expand Down
2 changes: 1 addition & 1 deletion postprocessing/queueProcessor.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
Post-processing agent start script
Expand Down
2 changes: 1 addition & 1 deletion scripts/ar-report.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import, division, print_function, unicode_literals
import h5py
import os
Expand Down
2 changes: 1 addition & 1 deletion scripts/mantidpython.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/env python
#!/bin/env python3
import os
import re
import subprocess
Expand Down
24 changes: 10 additions & 14 deletions tests/integration/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
FROM mambaorg/micromamba
FROM registry.access.redhat.com/ubi9/ubi

COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml .
RUN dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
RUN dnf update
RUN dnf install -y python3-requests python3-stomppy python3-pip python3-coverage
RUN python3 -m pip install plotly

RUN micromamba install --yes -n base --file environment.yml
COPY postprocessing /opt/postprocessing/postprocessing
COPY tests/integration/post_processing.conf /etc/autoreduce/post_processing.conf

ARG MAMBA_DOCKERFILE_ACTIVATE=1

COPY --chown=$MAMBA_USER:$MAMBA_USER postprocessing /opt/postprocessing/postprocessing
COPY --chown=$MAMBA_USER:$MAMBA_USER tests/integration/post_processing.conf /etc/autoreduce/post_processing.conf

RUN echo \#\!/bin/bash > /opt/conda/bin/coverage_run && \
echo coverage run \$@ >> /opt/conda/bin/coverage_run && \
chmod +x /opt/conda/bin/coverage_run
RUN echo \#\!/bin/bash > /usr/bin/coverage_run && \
echo coverage run \$@ >> /usr/bin/coverage_run && \
chmod +x /usr/bin/coverage_run

ENV PYTHONPATH /opt/postprocessing

USER root
RUN echo -e "[run]\nsource=postprocessing\nparallel=True\nrelative_files=True" > /opt/postprocessing/.coveragerc
RUN mkdir -p /opt/postprocessing/log && \
mkdir -p /opt/postprocessing/scripts && \
Expand All @@ -40,8 +38,6 @@ RUN mkdir -p /opt/postprocessing/log && \
\
chown -R $MAMBA_USER:$MAMBA_USER /opt/postprocessing /SNS

USER $MAMBA_USER

WORKDIR /opt/postprocessing
ENV COVERAGE_PROCESS_START /opt/postprocessing/.coveragerc

Expand Down

0 comments on commit 108e370

Please sign in to comment.