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
7357cad7
Commit
7357cad7
authored
3 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
Resolve "eic-shell --upgrade"
parent
a66bbe4d
No related branches found
No related tags found
1 merge request
!107
Resolve "eic-shell --upgrade"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+72
-0
72 additions, 0 deletions
install.sh
with
72 additions
and
0 deletions
install.sh
+
72
−
0
View file @
7357cad7
...
@@ -185,6 +185,78 @@ done
...
@@ -185,6 +185,78 @@ done
## 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
## capture environment setup for upgrades
CONTAINER=
$CONTAINER
TMPDIR=
$TMPDIR
VERSION=
$VERSION
PREFIX=
$PREFIX
DISABLE_CVMFS_USAGE=
${
DISABLE_CVMFS_USAGE
}
function print_the_help {
echo "USAGE: ./eic-shell [OPTIONS]"
echo "OPTIONAL ARGUMENTS:"
echo " -u,--upgrade Upgrade the container to the latest version"
echo " -n,--no-cvmfs Disable check for local CVMFS when updating. (D: enabled)"
echo " -h,--help Print this message"
echo ""
echo " Start the eic-shell containerized software environment."
echo ""
echo "EXAMPLE: ./eic-shell"
exit
}
UPGRADE=
while [
\$
# -gt 0 ]; do
key=
\$
1
case
\$
key in
-u|--upgrade)
UPGRADE=1
shift
;;
-n|--no-cvmfs)
DISABLE_CVMFS_USAGE=true
shift
;;
-h|--help)
print_the_help
exit 0
;;
*)
echo "ERROR: unknown argument:
\$
key"
echo "use --help for more info"
exit 1
;;
esac
done
if [ ! -z
\$
{UPGRADE} ]; then
echo "Upgrading eic-shell..."
if [ -z "
\$
DISABLE_CVMFS_USAGE" -a -d /cvmfs/singularity.opensciencegrid.org/eicweb/
\$
{CONTAINER}:
\$
{VERSION} ]; then
echo ""
echo "Note: You cannot manually update the container as you are using the CVMFS version."
echo " The container will automatically update every 24 hours."
echo " You can override this by setting the '--no-cvmfs' flag, which will"
echo " instantiate a local version."
echo " This is only recommended for expert usage."
echo ""
echo "Exiting without upgrade"
exit 0
fi
FLAGS="-p
\$
{PREFIX} -v
\$
{VERSION}"
if [ ! -z
\$
{TMPDIR} ]; then
FLAGS="
\$
{FLAGS} -t
\$
{TMPDIR}"
fi
if [ ! -z
\$
{DISABLE_CVMFS_USAGE} ]; then
FLAGS="
\$
{FLAGS} --no-cvmfs"
fi
curl https://eicweb.phy.anl.gov/containers/eic_container/-/raw/master/install.sh
\
| bash -s --
\$
{FLAGS}
echo "eic-shell upgrade sucessful"
exit 0
fi
export ATHENA_PREFIX=
$PREFIX
/local
export ATHENA_PREFIX=
$PREFIX
/local
export SINGULARITY_BINDPATH=
$BINDPATH
export SINGULARITY_BINDPATH=
$BINDPATH
$SINGULARITY
exec
$SIF
eic-shell
$SINGULARITY
exec
$SIF
eic-shell
...
...
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