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

add rucio and switch to centos7 #16

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kounelisagis
Copy link
Member

Closes #15.
Also, switches to CentOS7 as mentioned in #1.

Dockerfile Outdated
FROM ubuntu:bionic
RUN apt-get -y update && \
apt-get -y install \
FROM centos/python-38-centos7:latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this base image was last updated a year ago, in June 2021. Weren't there any security updates since then?

Note that for runtime environments, we don't need to use Python 3.8 as for REANA infrastructure components, we can use any Python version.

Perhaps even build on top of rootproject/root which has tags like 6.24.06-centos7 if that would be acceptable.

Dockerfile Outdated
# EGI trust anchors
RUN curl -Lo /etc/yum.repos.d/EGI-trustanchors.repo https://repository.egi.eu/sw/production/cas/1/current/repo-files/EGI-trustanchors.repo && \
yum -y install ca-certificates ca-policy-egi-core && \
yum -y update
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note several hadolint warnings reported in the CI. Please fix them by amending sources and/or silence them by using hadolint comments, as appropriate.

yum-builddep -y python3-gfal2 && \
pip install gfal2-python

RUN pip3 install rucio-clients==1.29.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to separate (i) move of the base image and (ii) addition of Rucio clients in two separate commits.

The second is really optional to have in a ROOT environment image, and may not be wanted by everybody. Hence calling for separate commits for separate feature changes here.

Dockerfile Outdated
# ROOT
RUN yum install -y gcc-c++ \
libX11-devel libXpm-devel libXft-devel libXext-devel python openssl-devel
RUN git clone --branch v6-24-00-patches --depth=1 https://github.com/root-project/root.git root_src
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v6-24-00-patches branch represents a movable target, so to speak; it will build a different ROOT version each time we run this.

Can we use some "fixed point" build instead, i.e. rather than a latest commit on some branch, what about checking out some well-defined frozen tag such as v6-24-06?

Dockerfile Outdated
WORKDIR root_build
RUN cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src
RUN cmake --build . -- install -j4
RUN source ../root_install/bin/thisroot.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clean up after the build any unnecessary directories etc? Note that we do rm -rf /code in Dockerfile in the master branch. Otherwise, without appropriate cleaning, the image is much bigger than it needs to be:

$ docker images | grep root6 | grep 6 | sed 's, \+, ,g'
reanahub/reana-env-root6 v6-24-00-patches 2afaab937438 13 minutes ago 4.65GB
reanahub/reana-env-root6 6.18.04 c754f13f32ae 2 years ago 2.07GB

Copy link
Member

@tiborsimko tiborsimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated reana-demo-root6 examples and checked locally and it seems to work well with the new image, all four engines. Which is great, as we can switch to a CentOS-based ROOT example image.

However, reana-demo-bsm-search does not work and would need some more investigations:

$ kubectl logs reana-run-job-2c11b0dd-a040-4b49-87f7-c390a4d5c83b-h4cpl
Traceback (most recent call last):
  File "/opt/rh/rh-python38/root/usr/lib64/python3.8/subprocess.py", line 64, in <module>
    import msvcrt
ModuleNotFoundError: No module named 'msvcrt'

@kounelisagis
Copy link
Member Author

To summarize:

  • Switched base image to rootproject/root, tag 6.24.06-centos7.
  • Separated into three different commits: (i) switch of the base image, (ii) addition of Rucio clients, and (iii) fixed hadolint warnings reported in the CI.
  • Switched from gfal2-python v6-24-00-patches "movable" to "fixed point" tag v6-24-06.
  • Added appropriate clean up commands for any unnecessary directories after the build, so the image becomes lighter.
  • Checked reana-demo-bsm-search and seems to work with the new base image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rucio-clients not available
2 participants