|
1 | 1 | # syntax = docker/dockerfile:1.0-experimental
|
2 |
| -FROM centos:7 |
3 |
| -ARG dirac_version=v6r21p7 |
| 2 | +from centos:8 |
| 3 | +ARG dirac_version=v6r22p6 |
4 | 4 | ARG lcgtools_version=v14r1
|
5 | 5 | ARG python_version=27
|
6 | 6 | ARG productionsystem_version=master
|
7 | 7 |
|
8 |
| -RUN yum install -y centos-release-scl |
9 |
| -RUN yum install -y rh-python36 |
10 |
| -RUN yum install -y wget git gcc |
11 |
| -RUN yum clean all |
| 8 | +RUN dnf swap -y coreutils-single coreutils # Fix for wrapper coreutils |
| 9 | +RUN dnf install -y gcc git wget python2 python3 python3-devel |
| 10 | +RUN alternatives --set python /usr/bin/python2 # Set unversioned python command to python2 for DIRAC scripts |
| 11 | +RUN python3 -m pip install --upgrade pip setuptools wheel |
| 12 | +RUN python3 -m pip install --upgrade productionsystem@git+https://github.com/alexanderrichards/ProductionSystem.git@$productionsystem_version |
| 13 | +RUN dnf clean all |
12 | 14 |
|
| 15 | +# DIRAC setup |
13 | 16 | RUN mkdir -p /root/dirac_ui
|
14 |
| - |
15 | 17 | WORKDIR /root/dirac_ui
|
16 |
| - |
17 | 18 | RUN wget -np -O dirac-install https://raw.githubusercontent.com/DIRACGrid/DIRAC/integration/Core/scripts/dirac-install.py
|
18 | 19 | RUN chmod u+x dirac-install
|
19 |
| -RUN ./dirac-install -r $dirac_version -i $python_version -g $lcgtools_version |
| 20 | +RUN ./dirac-install --dirac-os -r $dirac_version -i $python_version -g $lcgtools_version |
20 | 21 | RUN --mount=type=secret,id=proxy,dst=/tmp/x509up_u0 . /root/dirac_ui/bashrc && dirac-configure -F -S GridPP -C dips://dirac01.grid.hep.ph.ic.ac.uk:9135/Configuration/Server -I
|
| 22 | +# These two lines are necessary as git commands broken in DIRACOS so need to check out first then pip install else could do commented out line below |
| 23 | +RUN git clone -b $productionsystem_version https://github.com/alexanderrichards/ProductionSystem.git |
| 24 | +RUN . /root/dirac_ui/bashrc && python -m pip install --upgrade ProductionSystem/ |
| 25 | +#RUN . /root/dirac_ui/bashrc && python -m pip install -v --trusted-host github.com --upgrade productionsystem@git+https://github.com/alexanderrichards/ProductionSystem.git@$productionsystem_version |
21 | 26 | RUN rm -f dirac-install
|
22 | 27 |
|
23 |
| -WORKDIR /root |
24 | 28 |
|
25 |
| -RUN echo "virtualenv venv3" | scl enable rh-python36 - |
26 |
| -RUN . venv3/bin/activate && pip install --upgrade pip setuptools wheel |
27 |
| -RUN --mount=type=ssh . venv3/bin/activate && pip install productionsystem@git+git://github.com/alexanderrichards/ProductionSystem.git@$productionsystem_version |
28 |
| -RUN . dirac_ui/bashrc && python -m pip install --upgrade pip setuptools wheel |
29 |
| -RUN --mount=type=ssh . dirac_ui/bashrc && python -m pip install --upgrade productionsystem@git+git://github.com/alexanderrichards/ProductionSystem.git@$productionsystem_version |
| 29 | +## setup cron jobs - maybe not needed if mounting from outside. |
| 30 | + |
| 31 | + |
| 32 | +WORKDIR /root |
30 | 33 |
|
31 | 34 | COPY startup.sh /root/startup.sh
|
32 | 35 |
|
|
0 commit comments