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
fda0da91
Commit
fda0da91
authored
2 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
Added Arm64 support (docker-based), tested on M1-based Mac
parent
f5dab66b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!320
Added Arm64 support (docker-based), tested on M1-based Mac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
install.sh
+21
-9
21 additions, 9 deletions
install.sh
with
21 additions
and
9 deletions
install.sh
+
21
−
9
View file @
fda0da91
...
@@ -81,7 +81,7 @@ echo "Setting up development environment for eicweb/$CONTAINER:$VERSION"
...
@@ -81,7 +81,7 @@ echo "Setting up development environment for eicweb/$CONTAINER:$VERSION"
mkdir
-p
$PREFIX
/local/lib
||
exit
1
mkdir
-p
$PREFIX
/local/lib
||
exit
1
function
install_
l
in
ux
()
{
function
install_
s
in
gularity
()
{
SINGULARITY
=
SINGULARITY
=
## check for a singularity install
## check for a singularity install
## default singularity if new enough
## default singularity if new enough
...
@@ -213,7 +213,7 @@ function print_the_help {
...
@@ -213,7 +213,7 @@ function print_the_help {
echo " -n,--no-cvmfs Disable check for local CVMFS when updating. (D: enabled)"
echo " -n,--no-cvmfs Disable check for local CVMFS when updating. (D: enabled)"
echo " -h,--help Print this message"
echo " -h,--help Print this message"
echo ""
echo ""
echo " Start the eic-shell containerized software environment."
echo " Start the eic-shell containerized software environment
(Singularity version)
."
echo ""
echo ""
echo "EXAMPLES: "
echo "EXAMPLES: "
echo " - Start an interactive shell: ./eic-shell"
echo " - Start an interactive shell: ./eic-shell"
...
@@ -288,11 +288,11 @@ EOF
...
@@ -288,11 +288,11 @@ EOF
echo
" - Created custom eic-shell excecutable"
echo
" - Created custom eic-shell excecutable"
}
}
function
install_
macos
()
{
function
install_
docker
()
{
## check for docker install
## check for docker install
DOCKER
=
$(
which docker
)
DOCKER
=
$(
which docker
)
if
[
-z
${
DOCKER
}
]
;
then
if
[
-z
${
DOCKER
}
]
;
then
echo
"ERROR: no docker install found, docker is required for
running on MacOS
"
echo
"ERROR: no docker install found, docker is required for
the docker-based install
"
fi
fi
echo
" - Found docker at
${
DOCKER
}
"
echo
" - Found docker at
${
DOCKER
}
"
...
@@ -318,9 +318,14 @@ function install_macos() {
...
@@ -318,9 +318,14 @@ function install_macos() {
fi
fi
done
done
echo
" - Docker mount directive: '
$MOUNT
'"
echo
" - Docker mount directive: '
$MOUNT
'"
PLATFORM_FLAG
=
''
if
[
`
uname
-m
`
=
'arm64'
]
;
then
PLATFORM_FLAG
=
'--platform linux/amd64'
echo
" - Additional platform flag to run on arm64"
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
magix
PREFIX and then starts singularity
cat
<<
EOF
> eic-shell
cat
<<
EOF
> eic-shell
#!/bin/bash
#!/bin/bash
...
@@ -337,7 +342,7 @@ function print_the_help {
...
@@ -337,7 +342,7 @@ function print_the_help {
echo " -u,--upgrade Upgrade the container to the latest version"
echo " -u,--upgrade Upgrade the container to the latest version"
echo " -h,--help Print this message"
echo " -h,--help Print this message"
echo ""
echo ""
echo " Start the eic-shell containerized software environment."
echo " Start the eic-shell containerized software environment
(Docker version)
."
echo ""
echo ""
echo "EXAMPLES: "
echo "EXAMPLES: "
echo " - Start an interactive shell: ./eic-shell"
echo " - Start an interactive shell: ./eic-shell"
...
@@ -379,7 +384,7 @@ if [ ! -z \${UPGRADE} ]; then
...
@@ -379,7 +384,7 @@ if [ ! -z \${UPGRADE} ]; then
exit 0
exit 0
fi
fi
docker run
$MOUNT
-w=
$PWD
-it --rm -e ATHENA_PREFIX=
$PREFIX
/local
$IMG
eic-shell
\$
@
docker run
$PLATFORM_FLAG
$MOUNT
-w=
$PWD
-it --rm -e ATHENA_PREFIX=
$PREFIX
/local
$IMG
eic-shell
\$
@
EOF
EOF
chmod
+x eic-shell
chmod
+x eic-shell
...
@@ -389,14 +394,21 @@ EOF
...
@@ -389,14 +394,21 @@ EOF
## detect OS
## detect OS
OS
=
`
uname
-s
`
OS
=
`
uname
-s
`
CPU
=
`
uname
-m
`
case
${
OS
}
in
case
${
OS
}
in
Linux
)
Linux
)
echo
" - Detected OS: Linux"
echo
" - Detected OS: Linux"
install_linux
echo
" - Detected CPU:
$CPU
"
if
[
"
$CPU
"
=
"arm64"
]
;
then
install_docker
else
install_singularity
fi
;;
;;
Darwin
)
Darwin
)
echo
" - Detected OS: MacOS"
echo
" - Detected OS: MacOS"
install_macos
echo
" - Detected CPU:
$CPU
"
install_docker
;;
;;
*
)
*
)
echo
"ERROR: OS '
${
OS
}
' not currently supported"
echo
"ERROR: OS '
${
OS
}
' not currently supported"
...
...
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