Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
containers
eic_container
Commits
25b7e778
Commit
25b7e778
authored
3 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
Add workaround code for old singularity installs
parent
107931ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!56
Add workaround code for old singularity installs
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+46
-27
46 additions, 27 deletions
install.sh
with
46 additions
and
27 deletions
install.sh
+
46
−
27
View file @
25b7e778
...
@@ -15,40 +15,59 @@ echo "Setting up development environment for eicweb/$CONTAINER:$VERSION"
...
@@ -15,40 +15,59 @@ echo "Setting up development environment for eicweb/$CONTAINER:$VERSION"
mkdir
-p
local
/lib
||
exit
1
mkdir
-p
local
/lib
||
exit
1
## check for a singularity install
## check for a singularity install
if
[
$(
type
-P
singularity
)
]
;
then
## jlab singularity
if
[
-d
"/apps/singularity/3.7.1/bin/"
]
;
then
SINGULARITY
=
"/apps/singularity/3.7.1/bin/singularity"
## cvmfs singularity
elif
[
-f
"/cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity"
]
;
then
SINGULARITY
=
"/cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity"
## whatever is in the path
elif
[
$(
type
-P
singularity
)
]
;
then
SINGULARITY
=
$(
which singularity
)
SINGULARITY
=
$(
which singularity
)
#if [ -z $SINGULARITY ]; then
else
else
## jlab singularity
echo
"ERROR: no singularity found, please make sure you have singularity in your
\$
PATH"
if
[
-d
"/apps/singularity/3.7.1/bin/"
]
;
then
exit
1
SINGULARITY
=
"/apps/singularity/3.7.1/bin/singularity"
## cvmfs singularity
elif
[
-f
"/cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity"
]
;
then
SINGULARITY
=
"/cvmfs/oasis.opensciencegrid.org/mis/singularity/bin/singularity"
else
echo
"ERROR: no singularity found, please make sure you have singularity in your
\$
PATH"
exit
1
fi
fi
fi
echo
" - Found singularity at
$SINGULARITY
"
echo
" - Found singularity at
$SINGULARITY
"
## get singularity version
## we only care if is 2.x or not, so we can use singularity --version
## which returns 2.xxxxx for version 2
SINGULARITY_VERSION
=
`
$SINGULARITY
--version
`
SIF
=
SIF
=
## check if we can just use cvmfs for the image
if
[
${
SINGULARITY_VERSION
:0:1
}
=
2
]
;
then
if
[
-f
/cvmfs/eic.opensciencegrid.org/singularity/athena/jug_xl_v
${
VERSION
}
.sif
]
;
then
echo
"WARNING: your singularity version
$SINGULARITY_VERSION
is ancient, we strongly recommend using version 3.x"
ln
-sf
/cvmfs/eic.opensciencegrid.org/singularity/athena/jug_xl_v
${
VERSION
}
.sif
local
/lib
echo
"We will attempt to use a fall-back SIMG image to be used with this singularity version"
SIF
=
"
$PWD
/local/lib/jug_xl_v
${
VERSION
}
.sif"
if
[
-f
/gpfs02/eic/athena/jug_xl-3.0-stable.simg
]
;
then
## if not, download the container to the system
ln
-df
/gpfs02/eic/athena/jug_xl-3.0-stable.simg
local
/lib
SIF
=
"
$PWD
/local/lib/jug_xl-3.0-stable.simg"
else
echo
"Attempting last-resort singularity pull for old image"
echo
"This may take a few minutes..."
singularity pull docker://eicweb/
$CONTAINER
:
$VERSION
fi
## we are in sane territory, yay!
else
else
## get the python installer and run the old-style install
## check if we can just use cvmfs for the image
wget https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.py
if
[
-f
/cvmfs/eic.opensciencegrid.org/singularity/athena/jug_xl_v
${
VERSION
}
.sif
]
;
then
chmod
+x install.py
ln
-sf
/cvmfs/eic.opensciencegrid.org/singularity/athena/jug_xl_v
${
VERSION
}
.sif
local
/lib
./install.py
-c
$CONTAINER
-v
$VERSION
$PWD
/local
SIF
=
"
$PWD
/local/lib/jug_xl_v
${
VERSION
}
.sif"
## Don't place eic-shell in local/bin as this may
elif
[
-f
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/jug_xl_v3.0-stable.sif
]
;
then
## conflict with things we install inside the container
ln
-sf
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/jug_xl_v3.0-stable.sif
local
/lib
rm
$PWD
/local/bin/eic-shell
SIF
=
"
$PWD
/local/lib/jug_xl_v
${
VERSION
}
.sif"
## Cleanup
## if not, download the container to the system
rm
-rf
__pycache__ install.py
else
SIF
=
$PWD
/local/lib/
${
CONTAINER
}
.sif.
${
VERSION
}
## get the python installer and run the old-style install
wget https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.py
chmod
+x install.py
./install.py
-c
$CONTAINER
-v
$VERSION
$PWD
/local
## Don't place eic-shell in local/bin as this may
## conflict with things we install inside the container
rm
$PWD
/local/bin/eic-shell
## Cleanup
rm
-rf
__pycache__ install.py
SIF
=
$PWD
/local/lib/
${
CONTAINER
}
.sif.
${
VERSION
}
fi
fi
fi
if
[
-z
$SIF
-o
!
-f
$SIF
]
;
then
if
[
-z
$SIF
-o
!
-f
$SIF
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment