Commit 926cfbb5 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Decoupled base and prefactor code into two separate containers and moved to...

Decoupled base and prefactor code into two separate containers and moved to new container names nomenclature.
parent 87ec85e3
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -8,11 +8,11 @@ This container is based on the "lofaruser/imaging-pipeline:v3.10" base image, an


How to run the container with Docker:
How to run the container with Docker:


    docker run --rm -v $INPUT_DATA_FOLDER:/input_data,$OUTPUT_DATA_FOLDER:/output_data -it lofarit/prefactor3:pipeline_v3.10
    docker run --rm -v $INPUT_DATA_FOLDER:/input_data,$OUTPUT_DATA_FOLDER:/output_data -it lofarit/lofarit/prefactor3_base3.10
    
    
How to run the container wth Singularity:
How to run the container wth Singularity:


    singularity run --pid --writable-tmpfs --containall --cleanenv -B$INPUT_DATA_FOLDER:/input_data,$OUTPUT_DATA_FOLDER:/output_data docker://lofarit/prefactor3:pipeline_v3.10
    singularity run --pid --writable-tmpfs --containall --cleanenv -B$INPUT_DATA_FOLDER:/input_data,$OUTPUT_DATA_FOLDER:/output_data docker://lofarit lofarit/prefactor3_base3.10


These commands will start the container and place you in the /home/lofar directlry inside the container. In both cases you have to set the $INPUT_DATA_FOLDER and $OUTPUT_DATA_FOLDER to the input and output data folders respectively, on the host system (i.e. the machine on which you are running the container). Note that the output data folder must exists and have write permissions (if using Singularty, by the user running the container).
These commands will start the container and place you in the /home/lofar directlry inside the container. In both cases you have to set the $INPUT_DATA_FOLDER and $OUTPUT_DATA_FOLDER to the input and output data folders respectively, on the host system (i.e. the machine on which you are running the container). Note that the output data folder must exists and have write permissions (if using Singularty, by the user running the container).


base/Dockerfile

0 → 100644
+62 −0
Original line number Original line Diff line number Diff line
FROM lofaruser/imaging-pipeline:v3.10

# Set non-interactive
ENV DEBIAN_FRONTEND noninteractive

# Always update when extending base images
RUN apt update


#------------------------
# Install deps
#------------------------

# Git, Curl, sudo and  Nano
RUN apt-get install git curl sudo nano -y


#------------------------
# Lofar user
#------------------------

# Add group. We chose GID 65527 to try avoiding conflicts.
RUN groupadd -g 65527 lofar

# Add user. We chose UID 65527 to try avoiding conflicts.
RUN useradd lofar -d /home/lofar -u 65527 -g 65527 -m -s /bin/bash

# Add metuaser user to sudoers
RUN adduser lofar sudo

# No pass sudo (for everyone, actually)
COPY sudoers /etc/sudoers

# Setup home and input/output data directories
COPY data/input_data /input_data
COPY data/output_data /output_data
RUN chown lofar:lofar /home/lofar && chown -R lofar:lofar /input_data && chown -R lofar:lofar /output_data

# This is required mainly for Singularity
RUN mv /home/lofar /home/vanilla_lofar
RUN ln -s /tmp/lofarhome /home/lofar
RUN rm -rf /tmp/lofarhome


#----------------------
# Entrypoint
#----------------------

# Copy entrypoint
COPY entrypoint.sh /

# Give right permissions
RUN chmod 755 /entrypoint.sh

# Set entrypoint
ENTRYPOINT ["/entrypoint.sh"]

# Set user lofar
USER lofar

# Set container name
ENV CONTAINER_NAME='base3.10'
+3 −0
Original line number Original line Diff line number Diff line
#!/bin/bash

docker build  . -t lofarit/base3.10
Loading