Skip to content
Snippets Groups Projects
Commit ef1bf98f authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

added singularity CI

parent 8cd70159
No related branches found
No related tags found
No related merge requests found
image: eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
#image: whit2333/root_base:latest
#
singularity-build:
tags:
- singularity
script:
#- docker login eicweb.phy.anl.gov:4567 -u whit -p ${CI_IMAGE_BUILD_PAT}
- cp containers/singularity/Singularity .
- /bin/bash .gitlabci/setup.sh
- /bin/bash .gitlabci/build.sh Singularity
- mkdir -p build && cp *.simg build
- mkdir -p build && cp Singularity* build
# Step 2. Take a look at "artifacts" below and add the paths you want added
# You can also add the entire build folder. You can also upload to storage
# clients defined by sregistry, here are some examples
# https://singularityhub.github.io/sregistry-cli/clients
# Environment variables must be defined in CI encrypted secrets/settings
# https://code.stanford.edu/help/ci/variables/README#variables).
#- /bin/bash build.sh --uri collection/container --cli google-storage Singularity
#- /bin/bash build.sh --uri collection/container --cli google-drive Singularity
#- /bin/bash build.sh --uri collection/container --cli globus Singularity
#- /bin/bash build.sh --uri collection/container --cli registry Singularity
# This is where you can save job artifacts
# https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html
# You can specify the path to containers or the build folder to save.
# Don't forget to save your recipes too!
artifacts:
paths:
- build/Singularity.simg
- build/Singularity
Bootstrap: docker
From: eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
%help
Container for file-input simc
Tools:
- simc : SIMC version that takes file input
%labels
Maintainer "Sylvester Joosten"
Version v1.0
%post -c /bin/bash
echo "Constructing simc container"
echo "1. ------------------------------------------"
echo "1. -- Building and installing SIMC
echo "1. ------------------------------------------"
source /usr/local/bin/thisroot.sh
export PYTHONPATH=/usr/local/lib:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
cd /tmp
git clone --recurse-submodules https://eicweb.phy.anl.gov/jlab/simc-file-input.git && \
mkdir build && cd build && cmake ../simc-file-input && make -j20 install
cd /tmp && rm -rf build simc-file-input
# ===================================
# GLOBAL
# ===================================
%environment -c /bin/bash
export PYTHONPATH=/usr/local/lib:$PYTHONPATH
export PATH=/usr/loca/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=/usr/local/include
%runscript
echo "Launching a shell in the simc container."
echo "Use through singularity apps recommended (see help for more info)."
exec bash
# ===================================
# SIMC
# ===================================
%apprun simc
simc "%@"
%appenv simc
export PYTHONPATH=/usr/local/lib:$PYTHONPATH
export PATH=/usr/loca/bin:${PATH}
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export ROOT_INCLUDE_PATH=/usr/local/include
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment