Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
6
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
jlab
hallc
analyzer_software
hcana
Commits
4f2736d4
Commit
4f2736d4
authored
6 years ago
by
Whitney Armstrong
Browse files
Options
Downloads
Patches
Plain Diff
modified: .gitlab-ci.yml
modified: containers/docker/Makefile modified: containers/singularity/Singularity
parent
14adee26
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+13
-69
13 additions, 69 deletions
.gitlab-ci.yml
containers/docker/Makefile
+20
-13
20 additions, 13 deletions
containers/docker/Makefile
containers/singularity/Singularity
+6
-6
6 additions, 6 deletions
containers/singularity/Singularity
with
39 additions
and
88 deletions
.gitlab-ci.yml
+
13
−
69
View file @
4f2736d4
...
...
@@ -4,90 +4,34 @@ image: whit/image_recipes/ubuntu_dind:latest
stages
:
-
build
-
test
-
phase2
-
phase3
# - phase2
singularity
:
stage
:
build
when
:
manual
script
:
-
/bin/bash .gitlabci/setup.sh
artifacts
:
paths
:
-
build/Singularity.simg
-
build/Singularity
-
build/Singularity.broadwell.simg
-
build/Singularity.broadwell
# Ubuntu docker build
ubuntu_docker
:
stage
:
phase1
hcana_docker
:
stage
:
build
#when: manual
script
:
-
docker login eicweb.phy.anl.gov:4567 -u whit -p ${
eic0_registry_push_token
}
-
cd
ubuntu_base && make release
-
docker login eicweb.phy.anl.gov:4567 -u whit -p ${
CI_IMAGE_BUILD_PAT
}
-
cd
containers/docker && make build && make publish
# - docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
# - docker tag whit/image_recipes/ubuntu_base:latest eicweb.phy.anl.gov:4567/whit/image_recipes/ubuntu_base:latest
# - docker push eicweb.phy.anl.gov:4567/whit/image_recipes/ubuntu_base:latest
ubuntu_broadwell_docker
:
stage
:
phase1
#when: manual
script
:
-
docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
-
cd ubuntu_base && make release-alt
ubuntu_singular
:
stage
:
phase2
when
:
manual
script
:
-
/bin/bash .gitlabci/setup.sh
-
mkdir -p build
-
cd ubuntu_base && /bin/bash .gitlabci/build.sh Singularity.ubuntu && cp Singularity.ubunbu.simg ../build
-
cp ubuntu_base/Singularity.ubuntu build/.
artifacts
:
paths
:
-
build/Singularity.ubuntu.simg
-
build/Singularity.ubuntu
# ROOT docker image build
root_docker
:
stage
:
phase2
#when: manual
dependencies
:
-
ubuntu_docker
script
:
#- /bin/bash .gitlabci/setup.sh
-
docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
-
cd root_base && make release
# - docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
# - docker tag whit/image_recipes/root_base:latest eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
# - docker push eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
#- /bin/bash .gitlabci/setup.sh
root_broadwell_docker
:
stage
:
phase2
hcana_singular
:
#stage: phase2
#when: manual
dependencies
:
-
ubuntu_broadwell_docker
script
:
-
docker login eicweb.phy.anl.gov:4567 -u whit -p ${eic0_registry_push_token}
-
cd root_base && make release-alt
root_singular
:
stage
:
phase3
when
:
manual
-
hcana_docker
script
:
-
/bin/bash .gitlabci/setup.sh
-
mkdir -p build
-
cd root_base && /bin/bash .gitlabci/build.sh Singularity.root && cp Singularity.ubunbu.simg ../build
-
cp root_base/Singularity.root build/.
-
cp containers/singularity/Singuilarity Singularity.hcana
-
/bin/bash .gitlabci/build.sh Singularity.hcana && cp singularity.hcana.simg ../build
-
cp Singularity.hcana build/.
artifacts
:
paths
:
-
build/Singularity.root.simg
-
build/Singularity.root
-
build/Singularity.ubuntu.simg
-
build/Singularity.ubuntu
This diff is collapsed.
Click to expand it.
containers/docker/Makefile
+
20
−
13
View file @
4f2736d4
...
...
@@ -25,6 +25,7 @@ help: ## This help.
.DEFAULT_GOAL
:=
help
# ==========================================================================
#
build
:
##
build the image
docker build
-t
$(
APP_NAME
)
.
...
...
@@ -34,12 +35,13 @@ build-nc: ## Build the container without caching (from scratch)
build-alt
:
##
build the container for various machine architectures (broadwell
,
haswell
,
knl)
@
echo
'building for architecture:
$(
ALT_NAME
)
'
docker build
-t
$(
APP_NAME
)
_
$(
ALT_NAME
)
-f
Dockerfile.
$(
ALT_NAME
)
.
#docker tag
$(
APP_NAME
)
_
$(
ALT_NAME
)
$(
REPO
)
/
$(
APP_NAME
)
_
$(
ALT_NAME
)
:
$(
VERSION
)
build-alt-nc
:
##
build the container for various machine architectures (broadwell
,
haswell
,
knl)
@
echo
'build-alt-nc: building for architecture:
$(
ALT_NAME
)
'
docker build
--no-cache
-t
$(
APP_NAME
)
_
$(
ALT_NAME
)
-f
Dockerfile.
$(
ALT_NAME
)
.
# ==========================================================================
#
run
:
##
Run container on port configured in `config.env`
docker run
-i
-t
--rm
--env-file
=
./config.env
-p
=
$(
PORT
)
:
$(
PORT
)
--name
=
"
$(
APP_NAME
)
"
$(
REPO
)
/
$(
APP_NAME
)
:
$(
TAG_VERSION
)
...
...
@@ -49,14 +51,14 @@ stop: ## Stop and remove a running container
docker stop
$(
APP_NAME
);
docker
rm
$(
APP_NAME
)
# ==========================================================================
#
# Docker tagging
tag
:
tag-latest tag-version
##
Generate container tags for the `{version}` ans `latest` tags
tag
:
tag-latest
#
tag-version
##
Generate container tags for the `{version}` ans `latest` tags
tag-latest
:
##
Generate container `{version}` tag
@
echo
'create tag latest'
docker tag
$(
APP_NAME
)
$(
REPO
)
/
$(
APP_NAME
)
:latest
docker tag
$(
APP_NAME
)
$(
GL_GROUP
)
/
$(
APP_NAME
)
:latest
docker tag
$(
APP_NAME
)
$(
GL_REG_GROUP
)
/
$(
APP_NAME
)
:latest
docker tag
$(
APP_NAME
)
$(
REG_NAME
)
/
$(
REPO
)
/
$(
APP_NAME
)
:latest
#docker tag
$(
APP_NAME
)
$(
REPO
)
/
$(
APP_NAME
)
:
$(
VERSION
)
#docker tag
$(
APP_NAME
)
$(
GL_GROUP
)
/
$(
APP_NAME
)
:
$(
VERSION
)
...
...
@@ -78,9 +80,11 @@ tag-alt-version: ## Generate container `{version}` tag
# ==========================================================================
#
login
:
##
Auto login to AWS-ECR unsing aws-cli
docker login eicweb.phy.anl.gov:4567
-u
$(
REG_USER
)
-p
$(
REG_TOKEN
)
release
:
build publish
##
Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
#####
publish
:
login publish-latest
#
publish-version
##
Publish the `{version}` ans `latest` tagged containers to ECR
push
:
login
##
push after login @echo 'push latest to $(REG_NAME)/$(REPO)/$(APP_NAME):latest'
...
...
@@ -111,19 +115,22 @@ publish-alt-version: tag-alt-version ## Publish the `latest` taged container to
@
echo
'publish latest to
$(
REPO
)
'
docker push
$(
REG_NAME
)
/
$(
REPO
)
/
$(
APP_NAME
)
_
$(
ALT_NAME
)
:
$(
VERSION
)
# ==========================================================================
#
login
:
##
Auto login to AWS-ECR unsing aws-cli
docker login eicweb.phy.anl.gov:4567
-u
$(
REG_USER
)
-p
$(
REG_TOKEN
)
login-dockerhub
:
##
Auto login to AWS-ECR unsing aws-cli
login-dockerhub
:
##
login to hub.docker.com
@
echo
'docker hub login :'
docker login
publish-dockerhub
:
build
#
publish-version
##
Publish the `{version}` ans `latest` tagged containers to ECR
@
echo
'
$(
REPO_NAME
)
/
$(
APP_NAME
)
:
$(
TAG_VERSION
)
'
docker push
$(
REPO_NAME
)
/
$(
APP_NAME
)
:
$(
TAG_VERSION
)
docker push
$(
REPO_NAME
)
/
$(
APP_NAME
)
:
$(
VERSION
)
push-dockerhub
:
build
#
publish-version
##
Publish the `{version}` ans `latest` tagged containers to ECR
@
echo
'
$(
DH_ORG
)
/
$(
APP_NAME
)
:
$(
TAG_VERSION
)
'
docker push
$(
DH_ORG
)
/
$(
APP_NAME
)
:latest
#docker push
$(
DH_ORG
)
/
$(
APP_NAME
)
:
$(
VERSION
)
publish-dockerhub
:
build tag
#
publish-version
##
Publish the `{version}` ans `latest` tagged containers to ECR
@
echo
'
$(
DH_ORG
)
/
$(
APP_NAME
)
:
$(
TAG_VERSION
)
'
docker push
$(
DH_ORG
)
/
$(
APP_NAME
)
:latest
#docker push
$(
DH_ORG
)
/
$(
APP_NAME
)
:
$(
VERSION
)
# ==========================================================================
#
...
...
This diff is collapsed.
Click to expand it.
containers/singularity/Singularity
+
6
−
6
View file @
4f2736d4
Bootstrap: docker
From:
eicweb.phy.anl.gov:4567/whit/image_recipes/root_base
:latest
From:
hallac/hcana
:latest
%help
Help me. I'm in the container.
...
...
@@ -16,11 +16,11 @@ From: eicweb.phy.anl.gov:4567/whit/image_recipes/root_base:latest
echo "Hello from post"
source /usr/local/bin/thisroot.sh
export PYTHONPATH=/usr/local/lib:$PYTHONPATH
git clone https://gitlab+deploy-token-1:FaNA-Yg4s7hpjvWPZnq8@eicweb.phy.anl.gov/upsilon/Pcsim.git
mkdir Pcsim/build && cd Pcsim/build
cmake ../.
make -j20
make install
#
git clone https://gitlab+deploy-token-1:FaNA-Yg4s7hpjvWPZnq8@eicweb.phy.anl.gov/upsilon/Pcsim.git
#
mkdir Pcsim/build && cd Pcsim/build
#
cmake ../.
#
make -j20
#
make install
%runscript
...
...
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