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
c1f2c1e9
Commit
c1f2c1e9
authored
3 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
update install.sh for JLAB
parent
4c8e1ed0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!54
update install.sh for JLAB
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+49
-15
49 additions, 15 deletions
install.sh
with
49 additions
and
15 deletions
install.sh
+
49
−
15
View file @
c1f2c1e9
#!/bin/bash
#!/bin/bash
CONTAINER
=
jug_xl
CONTAINER
=
"
jug_xl
"
VERSION
=
3.0
.1
VERSION
=
"
3.0
-stable"
## Simple setup script that installs the container
## Simple setup script that installs the container
## in your local environment under $PWD/local/lib
## in your local environment under $PWD/local/lib
...
@@ -10,24 +10,58 @@ VERSION=3.0.1
...
@@ -10,24 +10,58 @@ VERSION=3.0.1
## with the $ATHENA_PREFIX variable pointing
## with the $ATHENA_PREFIX variable pointing
## to the $PWD/local directory
## to the $PWD/local directory
## get the python installer and run the old-style install
mkdir
-p
local
/lib
||
exit
1
#cp ../../current/eic_container/install.py .
wget https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.py
## check for a singularity install
chmod
+x install.py
if
[
$(
type
-P
singularity
)
]
;
then
./install.py
-c
$CONTAINER
-v
$VERSION
$PWD
/local
SINGULARITY
=
$(
which singularity
)
## ensure the container is executable
#if [ -z $SINGULARITY ]; then
chmod
+x
$PWD
/local/lib/
${
CONTAINER
}
.sif.
${
VERSION
}
else
## Don't place eic-shell in local/bin as this may
## jlab singularity
## conflict with things we install inside the container
if
[
-d
"/apps/singularity/3.7.1/bin/"
]
;
then
rm
$PWD
/local/bin/eic-shell
SINGULARITY
=
"/apps/singularity/3.7.1/bin/singularity"
## Cleanup
## cvmfs singularity
rm
-rf
__pycache__ install.py
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
echo
"Found singularity at
$SINGULARITY
"
SIF
=
## check if we can just use cvmfs for the image
if
[
-f
/cvmfs/eic.opensciencegrid.org/singularity/athena/jug_xl_v
${
VERSION
}
.sif
]
;
then
ln
-sf
/cvmfs/eic.opensciencegrid.org/singularity/athena/jug_xl_v
${
VERSION
}
.sif
local
/lib
SIF
=
"
$PWD
/local/lib/jug_xl_v
${
VERSION
}
.sif"
## if not, download the container to the system
else
## 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
if
[
-z
$SIF
-o
!
-f
$SIF
]
;
then
echo
"ERROR: no singularity image found"
else
echo
"Using
${
CONTAINER
}
image:
$SIF
"
fi
## create a new top-level eic-shell launcher script
## create a new top-level eic-shell launcher script
## that sets the ATHENA_PREFIX and then starts singularity
## that sets the ATHENA_PREFIX and then starts singularity
cat
<<
EOF
> eic-shell
cat
<<
EOF
> eic-shell
#!/bin/bash
#!/bin/bash
export ATHENA_PREFIX=
$PWD
/local
export ATHENA_PREFIX=
$PWD
/local
$
PWD
/local/lib/
${
CONTAINER
}
.sif.
${
VERSION
}
$
SINGULARITY
run
$SIF
EOF
EOF
chmod
+x eic-shell
chmod
+x eic-shell
echo
"Created custom eic-shell excecutable"
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