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
883e854a
Commit
883e854a
authored
3 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Plain Diff
Merge branch 'fix_install' into 'master'
Fix installer script See merge request
!68
parents
2b2d9b81
ad69e730
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!68
Fix installer script
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+27
-18
27 additions, 18 deletions
install.sh
with
27 additions
and
18 deletions
install.sh
+
27
−
18
View file @
883e854a
...
@@ -98,41 +98,50 @@ SIF=
...
@@ -98,41 +98,50 @@ SIF=
if
[
${
SINGULARITY_VERSION
:0:1
}
=
2
]
;
then
if
[
${
SINGULARITY_VERSION
:0:1
}
=
2
]
;
then
echo
"WARNING: your singularity version
$SINGULARITY_VERSION
is ancient, we strongly recommend using version 3.x"
echo
"WARNING: your singularity version
$SINGULARITY_VERSION
is ancient, we strongly recommend using version 3.x"
echo
"We will attempt to use a fall-back SIMG image to be used with this singularity version"
echo
"We will attempt to use a fall-back SIMG image to be used with this singularity version"
if
[
-f
/gpfs02/eic/athena/
jug_xl-3.0-stable
.simg
]
;
then
if
[
-f
/gpfs02/eic/athena/
${
CONTAINER
}
-
${
VERSION
}
.simg
]
;
then
ln
-sf
/gpfs02/eic/athena/
jug_xl-3.0-stable
.simg
local
/lib
ln
-sf
/gpfs02/eic/athena/
${
CONTAINER
}
-
${
VERSION
}
.simg
local
/lib
SIF
=
"
$PREFIX
/local/lib/
jug_xl-3.0-stable
.simg"
SIF
=
"
$PREFIX
/local/lib/
${
CONTAINER
}
-
${
VERSION
}
.simg"
else
else
echo
"Attempting last-resort singularity pull for old image"
echo
"Attempting last-resort singularity pull for old image"
echo
"This may take a few minutes..."
echo
"This may take a few minutes..."
SIF
=
"
$PREFIX
/local/lib/
jug_xl-3.0-stable
.simg"
SIF
=
"
$PREFIX
/local/lib/
${
CONTAINER
}
-
${
VERSION
}
.simg"
singularity pull
--name
"
$SIF
"
docker://eicweb/
$CONTAINER
:
$VERSION
singularity pull
--name
"
$SIF
"
docker://eicweb/
$CONTAINER
:
$VERSION
mv
`
basename
$SIF
`
$SIF
fi
fi
## we are in sane territory, yay!
## we are in sane territory, yay!
else
else
## check if we can just use cvmfs for the image
## check if we can just use cvmfs for the image
if
[
-d
/cvmfs/singularity.opensciencegrid.org/eicweb/jug_xl:
${
VERSION
}
]
;
then
if
[
-d
/cvmfs/singularity.opensciencegrid.org/eicweb/
${
CONTAINER
}
:
${
VERSION
}
]
;
then
ln
-sf
/cvmfs/singularity.opensciencegrid.org/eicweb/jug_xl:
${
VERSION
}
local
/lib
ln
-sf
/cvmfs/singularity.opensciencegrid.org/eicweb/
${
CONTAINER
}
:
${
VERSION
}
local
/lib
SIF
=
"
$PREFIX
/local/lib/jug_xl:
${
VERSION
}
"
SIF
=
"
$PREFIX
/local/lib/
${
CONTAINER
}
:
${
VERSION
}
"
elif
[
-f
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/jug_xl_v3.0-stable.sif
]
;
then
elif
[
-f
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/
${
CONTAINER
}
_
${
VERSION
}
.sif
]
;
then
ln
-sf
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/jug_xl_v3.0-stable.sif
local
/lib
ln
-sf
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/
${
CONTAINER
}
_
${
VERSION
}
.sif
local
/lib
SIF
=
"
$PREFIX
/local/lib/jug_xl_v
${
VERSION
}
.sif"
SIF
=
"
$PREFIX
/local/lib/
${
CONTAINER
}
-
${
VERSION
}
.sif"
elif
[
-f
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/
${
CONTAINER
}
_v
${
VERSION
}
.sif
]
;
then
ln
-sf
/gpfs02/cvmfst0/eic.opensciencegrid.org/singularity/athena/
${
CONTAINER
}
_v
${
VERSION
}
.sif
local
/lib
SIF
=
"
$PREFIX
/local/lib/
${
CONTAINER
}
-v
${
VERSION
}
.sif"
## if not, download the container to the system
## if not, download the container to the system
else
else
## get the python installer and run the old-style install
## get the python installer and run the old-style install
## work in temp directory
tmp_dir
=
$(
mktemp
-d
-t
ci-XXXXXXXXXX
)
pushd
$tmp_dir
wget https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.py
wget https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.py
chmod
+x install.py
chmod
+x install.py
./install.py
-f
-c
$CONTAINER
-v
$VERSION
$PREFIX
/local
./install.py
-f
-c
$CONTAINER
-v
$VERSION
.
## Don't place eic-shell in local/bin as this may
INSIF
=
`
ls
lib/
$CONTAINER
.sif.
*
|
head
-n1
`
## conflict with things we install inside the container
SIF
=
"
$PREFIX
/local/lib/
${
CONTAINER
}
-
${
VERSION
}
.sif"
rm
$PREFIX
/local/bin/eic-shell
mv
$INSIF
$SIF
##
C
leanup
##
c
leanup
rm
-rf
__pycache__ install.py
popd
SIF
=
$PREFIX
/local/lib/
${
CONTAINER
}
.sif.
${
VERSION
}
rm
-rf
$tmp_dir
fi
fi
fi
fi
if
[
-z
$SIF
-o
!
-f
$SIF
-o
!
-d
$SIF
]
;
then
echo
$SIF
if
[
-z
$SIF
]
;
then
echo
"ERROR: no singularity image found"
echo
"ERROR: no singularity image found"
exit
1
else
else
echo
" - Deployed
${
CONTAINER
}
image:
$SIF
"
echo
" - Deployed
${
CONTAINER
}
image:
$SIF
"
fi
fi
...
...
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