Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Wiki
Code
Merge requests
29
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
3637f18e
Commit
3637f18e
authored
4 years ago
by
Sylvester Joosten
Browse files
Options
Downloads
Patches
Plain Diff
prepared container for v2.0.1
parent
b85e0fd2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
v2.0.1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab-ci.yml
+4
-0
4 additions, 0 deletions
.gitlab-ci.yml
README.md
+55
-8
55 additions, 8 deletions
README.md
deploy.py
+14
-4
14 additions, 4 deletions
deploy.py
install/util.py
+3
-3
3 additions, 3 deletions
install/util.py
with
76 additions
and
15 deletions
.gitlab-ci.yml
+
4
−
0
View file @
3637f18e
...
...
@@ -12,6 +12,7 @@ eic_builder_release:
only
:
-
tags
-
master
-
staging
script
:
-
cd containers/builder
-
head Dockerfile
...
...
@@ -36,6 +37,7 @@ eic_release:
only
:
-
tags
-
master
-
staging
script
:
-
cd containers/release
-
make login
...
...
@@ -56,6 +58,7 @@ eic_builder_singularity:
tags
:
-
sodium dind
only
:
-
staging
-
tags
when
:
manual
script
:
...
...
@@ -75,6 +78,7 @@ eic_singularity:
tags
:
-
sodium dind
only
:
-
staging
-
tags
script
:
-
cp containers/release/eic.def .
...
...
This diff is collapsed.
Click to expand it.
README.md
+
55
−
8
View file @
3637f18e
...
...
@@ -15,33 +15,80 @@ cd eic_container
modelefile will be installed to
`$PREFIX/../../etc/modulefiles`
.
You can use the
`-v`
flag to select the version you want to deploy, or omit the
flag if you want to install the master build. The recommended stable
release version is
`v2.0.
0
`
.
release version is
`v2.0.
1
`
.
```
bash
./deploy.py
-v
2.0.
0
<PREFIX>
./deploy.py
-v
2.0.
1
<PREFIX>
```
Available flags:
```
bash
-v
VERSION,
--version
VERSION
(
opt.
)
project version. Default: current
git branch/tag
.
(
opt.
)
project version. Default: current
version
(
in
repo
)
.
-b
BIND_PATHS,
--bind-path
BIND_PATHS
(
opt.
)
extra
bind
paths
for
singularity.
-m
MODULE_PATH,
--module-path
MODULE_PATH
(
opt.
)
Root module path where you want to
install
a
modulefile. D: <prefix>/../../etc/modulefiles
-l
,
--local
Local deploy, will not
install
the modulefiles
(
you will have
to run the launcher scripts from their relative paths
)
.
-f
,
--force
Force-overwrite already downloaded container with the same name.
--install-builder
BUILDER
(
opt.
)
Install fat builder image, instead of normal
slim image
```
3.
To use the container
: load the modulefile, and then use the included apps as if
they are native apps on your system!
3.
To use the container
in installed mode, you can load the modulefile,
and then use the included apps as if
they are native apps on your system!
```
bash
module load eic_container
```
4.
To use the container in local mode, you can run the runscripts (under
`$PREFIX/bin`
)
manually.
4.
(Advanced) If you need to add additional bind directives for the internal singularity container,
you can add them with the
`-b`
flag. Run
`./deploy.py -h`
to see a list of all
supported options.
Usage
-----
### A. Running the singularity development environment with modulefiles
1.
Add the installed modulefile to your module path, e.g.,
```
bash
module use <prefix>/../../etc/modulefiles
```
2.
Load the eic container
```
bash
module load eic_container
```
3.
To start a shell in the container environment, do
```
bash
eic-shell
```
### B. Running the singularity development locally (without modulefiles)
1.
This is assuming you deployed with the
`-l`
flag to a prefix
`$PREFIX`
:
```
bash
./deploy.py
$PREFIX
```
2.
To start a shell in the container environment, do
```
bash
$PREFIX
/bin/eic-shell
```
### C. Using the docker container for your CI purposes
1.
To load the container environment in your run scripts, you can
-
launch the script or program using
`eic-shell`
,
-
or
`source /etc/eic-env.sh`
at the start of your commands.
2.
If using this container as a basis for a new container, you can direction access
the full container environment from a docker
`RUN`
shell command with no further
action needed. For the most optimal experience, you can install your software to
`/opt/view`
to fully integrate with the existing environment. Depending on your
use case, installation to
`/usr/local`
may also work, but this might require you
to write and run additional environment scripts.
This diff is collapsed.
Click to expand it.
deploy.py
+
14
−
4
View file @
3637f18e
...
...
@@ -24,7 +24,7 @@ GROUP_NAME='containers'
PROJECT_NAME
=
'
eic_container
'
IMAGE_ROOT
=
'
eic
'
PROGRAMS
=
[
(
'
eic
_
shell
'
,
'
/usr/bin/bash
'
),
PROGRAMS
=
[
'
eic
-
shell
'
,
'
root
'
,
'
ipython
'
]
...
...
@@ -45,7 +45,7 @@ if __name__ == "__main__":
'
-v
'
,
'
--version
'
,
dest
=
'
version
'
,
default
=
project_version
(),
help
=
'
(opt.) project version. Default: current
git branch/tag
.
'
)
help
=
'
(opt.) project version. Default: current
version (in repo)
.
'
)
parser
.
add_argument
(
'
-f
'
,
'
--force
'
,
action
=
'
store_true
'
,
...
...
@@ -60,6 +60,12 @@ if __name__ == "__main__":
'
-m
'
,
'
--module-path
'
,
dest
=
'
module_path
'
,
help
=
'
(opt.) Root module path where you want to install a modulefile. D: <prefix>/../../etc/modulefiles
'
)
parser
.
add_argument
(
'
-l
'
,
'
--local
'
,
action
=
'
store_true
'
,
dest
=
'
local
'
,
help
=
'
Local deploy, will not install the modulefiles (you will have to run
'
'
the launchers scripts from their relative paths).
'
)
parser
.
add_argument
(
'
--install-builder
'
,
dest
=
'
builder
'
,
...
...
@@ -100,7 +106,10 @@ if __name__ == "__main__":
libexecdir
=
'
{}/libexec
'
.
format
(
args
.
prefix
)
root_prefix
=
os
.
path
.
abspath
(
'
{}/..
'
.
format
(
args
.
prefix
))
moduledir
=
'
{}/{}
'
.
format
(
args
.
module_path
,
PROJECT_NAME
)
for
dir
in
[
bindir
,
libdir
,
libexecdir
,
moduledir
]:
dirs
=
[
bindir
,
libdir
,
libexecdir
]
if
not
args
.
local
:
dirs
.
append
(
moduledir
)
for
dir
in
dirs
:
print
(
'
-
'
,
dir
)
smart_mkdir
(
dir
)
...
...
@@ -123,7 +132,8 @@ if __name__ == "__main__":
print
(
'
WARNING: Container found at
'
,
container
)
print
(
'
---> run with -f to force a re-download
'
)
make_modulefile
(
PROJECT_NAME
,
version
,
moduledir
,
bindir
)
if
not
args
.
local
:
make_modulefile
(
PROJECT_NAME
,
version
,
moduledir
,
bindir
)
## configure the application launchers
print
(
'
Configuring applications launchers:
'
)
...
...
This diff is collapsed.
Click to expand it.
install/util.py
+
3
−
3
View file @
3637f18e
...
...
@@ -32,7 +32,7 @@ def smart_mkdir(dir):
def
project_version
():
'''
Return the project version based on the current git branch/tag.
'''
## Shell command to get the current
gi
t version
git_
version_cmd
=
'
git symbolic-ref -q --short HEAD || git describe --tags --exact-match
'
## Shell command to get the current
projec
t version
version_cmd
=
'
cat VERSION
'
## Strip will remove the leading \n character
return
os
.
popen
(
git_
version_cmd
).
read
().
strip
()
return
os
.
popen
(
version_cmd
).
read
().
strip
()
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