Skip to content
Snippets Groups Projects
Commit 3e8c4253 authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Version 2.0 container including updated tools and gaudi

parent 4aac3c6e
No related branches found
No related tags found
1 merge request!2Release version for v2.0.0 container
Showing
with 410 additions and 327 deletions
# Compiled Object files
*.slo
*.lo
*.o
# Compiled Dynamic libraries
*.so
*.dylib
# Compiled Static libraries
*.lai
*.la
*.a
# build trees
DEBUG*/*
BUILD*/*
RELEASE*/*
TEST*/*
# cmake
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
# vim
~*
*.swp
......
......@@ -3,38 +3,62 @@ image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
stages:
- phase1
- phase2
- phase3
eic_docker:
eic_builder_docker:
stage: phase1
tags:
- eic0 docker
- sodium dind
script:
- cd containers/docker
- cd containers/builder
- head Dockerfile
- make login
- make release
- make release-cached
eic_singularity:
image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
eic_docker:
stage: phase2
tags:
- singularity
- sodium dind
script:
- cd containers/release
- make login
- make release-cached
eic_builder_singularity:
stage: phase2
tags:
- sodium dind
only:
- tags
- develop
when: manual
script:
- cp containers/singularity/eic.def .
- cp containers/builder/eic_builder.def .
- /bin/bash .gitlabci/setup.sh
- /bin/bash .gitlabci/build.sh eic_builder.def
- mkdir -p build
- cp eic_builder.sif build/.
- cp eic_builder.def build/.
artifacts:
paths:
- build/eic_builder.sif
- build/eic_builder.def
eic_singularity:
stage: phase3
tags:
- sodium dind
only:
- tags
- develop
script:
- cp containers/release/eic.def .
- /bin/bash .gitlabci/setup.sh
- /bin/bash .gitlabci/build.sh eic.def
- mkdir -p build
- cp eic.sif build/.
- cp eic.def build/.
# This is where you can save job artifacts
# https://docs.gitlab.com/ee/user/project/pipelines/job_artifacts.html
# You can specify the path to containers or the build folder to save.
# Don't forget to save your recipes too!
artifacts:
paths:
- build/eic.sif
- build/eic.def
## CMake project file for hallac_container
################################################################################
## PROJECT: hallac_container
################################################################################
cmake_minimum_required (VERSION 3.8)
project (eic_container VERSION 1.3.3)
################################################################################
## The name of our container
################################################################################
set(CONTAINER eic-${PROJECT_VERSION}.sif)
################################################################################
## CMAKE Settings
################################################################################
include(cmake/options.cmake)
################################################################################
## Subdirectories
################################################################################
add_subdirectory(containers)
add_subdirectory(modulefiles)
add_subdirectory(scripts)
......@@ -15,52 +15,33 @@ 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 `v1.0.4`.
release version is `v2.0.0`.
```bash
./deploy.py -v 1.0.4 <PREFIX>
./deploy.py -v 2.0.0 <PREFIX>
```
Available flags:
```bash
-v VERSION, --version VERSION
(opt.) project version. Default: current git branch/tag.
-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
-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!
```
```bash
module load eic_container
```
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.
Installation (throug cmake)
---------------------------
*Use of the cmake-based deploy is deprecated, We recommend to use the `deploy.py` method
instead.*
1. Checkout the repository and create a build directory
```
git clone https://eicweb.phy.anl.gov/containers/eic_container.git
cd eic_containers && mkdir BUILD && cd BUILD
```
2. Configure the install for your environment, providing the appropriate `prefix` and
`module_dir` you want to use.
```
cmake ../. -DCMAKE_INSTALL_PREFIX=$HOME/stow/development
```
or
```
cmake ../. -DCMAKE_INSTALL_PREFIX=<prefix> -DINSTALL_MODULE_DIR=<module_dir>
```
3. Download the container and install.
```
make install
```
4. To use the container: load the modulefile, and then use the included apps as if
they are native to your system!
```
module load eic_container
```
2.0.0
################################################################################
## CMAKE Settings
################################################################################
## make sure that the default is RELEASE
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo."
FORCE)
endif ()
## Offer the user the choice of overriding the installation directories
set(INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
set(INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
set(INSTALL_INCLUDE_DIR include/${PROJECT_NAME} CACHE PATH "Installation directory for header files")
set(INSTALL_MODULE_DIR ${CMAKE_INSTALL_PREFIX}/../../etc/modulefiles CACHE PATH "Installation directory for module files")
set(INSTALL_BIND_PATH "/net" "/group" "/cache" "/work" "/volatile" CACHE PATH "Installation singularity bind path")
if(WIN32 AND NOT CYGWIN)
set(DEF_INSTALL_CMAKE_DIR cmake)
else()
set(DEF_INSTALL_CMAKE_DIR lib/cmake/${PROJECT_NAME})
endif()
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH
"Installation directory for cmake files")
## Make relative paths absolute (useful when auto-generating cmake configuration
## files) Note: not including INSTALL_BIND_PATH on purpose as we should be giving absolute
## paths anyway
foreach(p LIB BIN INCLUDE CMAKE MODULE)
set(var INSTALL_${p}_DIR)
if(NOT IS_ABSOLUTE "${${var}}")
set(${var} "${CMAKE_INSTALL_PREFIX}/${${var}}")
endif()
endforeach()
## extra cmake modules
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${PROJECT_SOURCE_DIR}/cmake/")
################################################################################
## Download the container
################################################################################
set(CONTAINER_SOURCE
"https://eicweb.phy.anl.gov/containers/eic_container/-/jobs/artifacts/v${PROJECT_VERSION}/raw/build/eic.sif?job=eic_singularity")
add_custom_command(OUTPUT ${CONTAINER}
COMMAND wget ${CONTAINER_SOURCE} -O ${CONTAINER}
COMMENT "Downloading ${CONTAINER}"
)
################################################################################
## Global target
################################################################################
add_custom_target(container ALL
DEPENDS ${CONTAINER})
################################################################################
## Install the container to <prefix>/lib
################################################################################
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${CONTAINER}
DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib)
# Builder with Argonne EIC software
#
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/eic_spack:1.0.0
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="eic_builder" \
group="eic_builder" \
march="native" \
basedist="ubuntu" \
base="ubuntu"
ENV DOCKERFILE_BASE=ubuntu \
DOCKERFILE_DISTRO=ubuntu \
DOCKERFILE_DISTRO_VERSION=20.04 \
SPACK_ROOT=/opt/spack \
DEBIAN_FRONTEND=noninteractive \
CURRENTLY_BUILDING_DOCKER_IMAGE=1 \
container=docker
## Ensure an up-to-date custom package list
RUN rm -rf $SPACK_ROOT/np-spack \
&& git clone https://eicweb.phy.anl.gov/EIC/np-spack.git $SPACK_ROOT/np-spack \
&& rm -rf $SPACK_ROOT/np-spack/.git \
&& echo "repos:" > $SPACK_ROOT/etc/spack/repos.yaml \
&& echo " - $SPACK_ROOT/np-spack" >> $SPACK_ROOT/etc/spack/repos.yaml
## Install the software, building on the existing root environment.
## This is a raw builder image, so no calls to spack gc
## FIXME: eigen should be explicitly added upstream
RUN cd /opt/spack-environment && spack env activate . \
&& spack add npdet@master \
&& spack add eigen \
&& spack install \
&& spack clean -a
## FIXME: ipython etc should be added upstream
RUN cd /opt/spack-environment && spack env activate . \
&& pip install --trusted-host pypi.org \
--trusted-host files.pythonhosted.org \
--no-cache-dir \
ipython matplotlib scipy
## Strip the binaries
RUN find -L /opt/view/* -type f -exec readlink -f '{}' \; | \
xargs file -i | \
grep 'charset=binary' | \
grep 'x-executable\|x-archive\|x-sharedlib' | \
awk -F: '{print $1}' | xargs strip -s
# Modifications to the environment that are necessary to run
RUN cd /opt/spack-environment && \
spack env activate --sh -d . >> /etc/profile.d/z10_spack_environment.sh
ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"]
File moved
......@@ -9,8 +9,8 @@ REG_URL ?= https://$(REG_HOST)
# Dockerfile.$(ALT_NAME) --> $(APP_NAME)_${ALT_NAME}
ALT_NAME ?= broadwell
APP_NAME = eic_container
REPO_NAME = eic_container
APP_NAME = eic_builder
REPO_NAME = eic_builder
DH_ORG = eic
......
Bootstrap: docker
From: eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest
%help
EIC software container.
Tools:
Tools:
- eic_shell : Bash shell in this container
- root : Root shell in the container
- ipython : Python shell in the container
%labels
Maintainer "Whitney Armstrong, Sylvester Joosten"
Version v2.0
%post -c /bin/bash
echo " -------------------------------------------------"
echo " ===> Image setup complete"
echo " -------------------------------------------------"
#!/bin/bash
head -n1 ../../VERSION
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/dd4hep_base:latest
LABEL maintainer="Whitney Armstrong <warmstrong@anl.gov>" \
name="eic_container" \
group="containers/eic_container" \
march="native" \
basedist="ubuntu" \
base="dd4hep_base"
ENV PYTHONPATH="/usr/local/lib:${PYTHONPATH}"
#RUN source /usr/local/bin/thisroot.sh \
COPY HepPDT-3.04.01.tar.gz /tmp/HepPDT-3.04.01.tar.gz
RUN cd /tmp \
&& apt-get update && apt-get install -y libtbb-dev libtbb2 \
&& tar -zxf HepPDT-3.04.01.tar.gz \
&& cd HepPDT-3.04.01 \
&& ./configure && make -j30 && make install \
&& cd /tmp && rm -r HepPDT-3.04.01
RUN cd /tmp \
&& git clone https://gitlab.cern.ch/hepmc/HepMC3.git \
&& mkdir HepMC3/build && cd HepMC3/build \
&& cmake ../. -DHEPMC3_ENABLE_ROOTIO=ON -DCMAKE_INSTALL_PREFIX=/usr/local -DHEPMC3_BUILD_EXAMPLES=ON \
&& make -j20 \
&& make install \
&& cd /tmp && rm -rf /tmp/HepMC3
RUN cd /tmp \
&& apt-get update && apt-get install -y rsync \
&& wget http://home.thep.lu.se/~torbjorn/pythia8/pythia8244.tgz \
&& tar -zxf pythia8244.tgz && cd pythia8244 \
&& ./configure --prefix=/usr/local --enable-shared --enable-64bit --with-root --with-hepmc3 \
&& make -j30 \
&& make install \
&& cd /tmp && rm -rf /tmp/pythia8244
RUN apt-get update && apt-get remove -y libtbb-dev libtbb2 \
&& cd /tmp \
&& git clone https://eicweb.phy.anl.gov/eic_tools/DD4hep.git \
&& source /usr/local/bin/thisroot.sh \
&& source /usr/local/bin/geant4.sh \
&& mkdir -p DD4hep/build && cd DD4hep/build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_CXX_STANDARD=17 \
-DDD4HEP_USE_GEANT4=ON \
-DDD4HEP_USE_HEPMC3=ON \
&& make -j30 && make -j4 install \
&& cd /tmp && rm -rf /tmp/DD4hep \
&& apt-get update && apt-get install -y libtbb-dev libtbb2 \
&& apt-get clean -y
RUN cd /tmp \
&& git clone https://github.com/acts-project/acts.git \
&& source /usr/local/bin/thisroot.sh \
&& source /usr/local/bin/geant4.sh \
&& source /usr/local/bin/thisdd4hep.sh \
&& mkdir -p acts/build && cd acts/build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local \
-DCMAKE_CXX_STANDARD=17 \
-DACTS_BUILD_DD4HEP_PLUGIN=ON \
-DACTS_BUILD_TGEO_PLUGIN=ON \
-DACTS_BUILD_JSON_PLUGIN=ON \
-DACTS_BUILD_IDENTIFICATION_PLUGIN=ON \
-DACTS_BUILD_FATRAS=ON \
-DACTS_BUILD_DIGITIZATION_PLUGIN=ON \
&& make -j30 && make -j4 install \
&& cd /tmp && rm -rf /tmp/acts
RUN cd /tmp \
&& source /usr/local/bin/thisroot.sh \
&& source /usr/local/bin/geant4.sh \
&& git clone https://eicweb.phy.anl.gov/EIC/podio.git \
&& mkdir -p podio/build && cd podio/build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
&& make -j30 && make -j4 install \
&& cd /tmp/podio/lcio2 && mkdir build && cd build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
&& make -j30 && make -j4 install \
&& cd /tmp/podio/lcio2_tools && mkdir build && cd build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
&& make -j30 && make -j4 install \
&& cd /tmp && rm -rf /tmp/podio
RUN cd /tmp \
&& git clone https://eicweb.phy.anl.gov/eic_tools/GenFit.git \
&& mkdir -p /tmp/GenFit/build \
&& cd /tmp/GenFit/build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
&& make -j4 \
&& make -j4 install \
&& cd /tmp && rm -rf /tmp/GenFit
RUN cd /tmp && git clone https://eicweb.phy.anl.gov/EIC/GenFind.git \
&& mkdir -p /tmp/GenFind/build \
&& cd /tmp/GenFind/build \
&& cmake ../. -DCMAKE_CXX_STANDARD=17 \
&& make VERBOSE=1 \
&& make -j4 install \
&& cd /tmp && rm -rf /tmp/GenFind
RUN cd /tmp \
&& git clone https://eicweb.phy.anl.gov/EIC/NPDet.git \
&& source /usr/local/bin/thisroot.sh \
&& source /usr/local/bin/geant4.sh \
&& source /usr/local/bin/thisdd4hep.sh \
&& mkdir -p NPDet/build && cd NPDet/build \
&& cmake ../. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_CXX_STANDARD=17 \
&& make -j30 && make -j4 install \
&& cd /tmp && rm -rf /tmp/NPDet
RUN cd /tmp \
&& apt-get install -y libtbb-dev \
&& source /usr/local/bin/thisroot.sh \
&& source /usr/local/bin/geant4.sh \
&& source /usr/local/bin/thisdd4hep.sh \
&& git clone https://eicweb.phy.anl.gov/eic_tools/gaudi.git \
&& mkdir -p gaudi/build && cd gaudi/build \
&& cmake --version \
&& cmake ../. -DBoost_NO_BOOST_CMAKE=TRUE \
-DCMAKE_INSTALL_PREFIX=/usr/local \
-DGAUDI_USE_SYSTEM_CPP_GSL=OFF \
-DGAUDI_USE_SYSTEM_RANGES_V3=OFF \
-DCMAKE_CXX_STANDARD=17 \
&& make -j30 && make -j4 install \
&& cd /tmp && rm -rf /tmp/gaudi
File deleted
# INSTALL
# - copy the files deploy.env, config.env, version.sh and Makefile to your repo
# - replace the vars in deploy.env
# - define the version script
# Build the container
make build
# Build and publish the container
make release
# Publish a container to AWS-ECR.
# This includes the login to the repo
make publish
# Run the container
make run
# Build an run the container
make up
# Stop the running container
make stop
# Build the container with differnt config and deploy file
make cnf=another_config.env dpl=another_deploy.env build
\ No newline at end of file
#!/bin/bash
grep "eic_container VERSION" ../../CMakeLists.txt | sed 's/project (eic_container VERSION //' | sed 's/)//'
# Release container for Argonne EIC software
# Copy over relevant files from builder
#
FROM eicweb.phy.anl.gov:4567/containers/eic_container/eic_builder:latest as builder
RUN cd /opt/spack-environment && spack env activate . && spack gc -y
FROM eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_minimal:20.04
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="eic_container" \
group="eic_container" \
march="native" \
basedist="ubuntu" \
base="ubuntu"
ENV DOCKERFILE_BASE=ubuntu \
DOCKERFILE_DISTRO=ubuntu \
DOCKERFILE_DISTRO_VERSION=20.04 \
DEBIAN_FRONTEND=noninteractive \
CURRENTLY_BUILDING_DOCKER_IMAGE=1 \
container=docker
## Copy over files from builder
COPY --from=builder /opt/spack-environment /opt/spack-environment
COPY --from=builder /opt/software /opt/software
COPY --from=builder /opt/view /opt/view
COPY --from=builder /etc/profile.d/z10_spack_environment.sh /etc/profile.d/z10_spack_environment.sh
COPY --from=builder /root/.bashrc /etc/bash.bashrc
ENTRYPOINT ["/bin/bash", "--rcfile", "/etc/profile", "-l"]
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
# exports variables in config.env as environment variables
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
SHELL = bash
# grep the version from the mix file
VERSION=$(shell bash version.sh)
# help will output the help for each task
# thanks to https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
# ==========================================================================
#
build: ## build the image
docker build -t $(APP_NAME) .
build-nc: ## Build the container without caching (from scratch)
docker build --no-cache -t $(APP_NAME) .
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) .
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)
up: build run ## Run container on port configured in `config.env` (Alias to run)
stop: ## Stop and remove a running container
docker stop $(APP_NAME); docker rm $(APP_NAME)
# ==========================================================================
#
tag: tag-latest tag-version #tag-version ## Generate container tags for the `{version}` and `latest` tags
tag-latest: ## Generate container `{version}` tag
@echo 'create tag latest'
#docker tag $(APP_NAME) $(REPO)/$(APP_NAME):latest
tag-version: ## Generate container `latest` tag
@echo 'creating tag $(APP_NAME):$(VERSION)'
docker tag $(APP_NAME):latest $(APP_NAME):$(VERSION)
tag-alt: tag-alt-latest # tag-alt-version ## Generate container tags for the `{version}` ans `latest` tags
tag-alt-latest: ## Generate container `{version}` tag
@echo 'create tag latest'
#docker tag $(APP_NAME)_$(ALT_NAME) $(REPO)/$(APP_NAME)_$(ALT_NAME):latest
tag-alt-version: ## Generate container `{version}` tag
@echo 'create tag latest'
docker tag $(APP_NAME)_$(ALT_NAME) $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
# ==========================================================================
#
login: ## Auto login to AWS-ECR unsing aws-cli
docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
echo "Login COMPLETE"
release: build-nc publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
@echo "Cleaning up"
docker rmi $(APP_NAME):latest
release-cached: build publish ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
publish: login publish-latest publish-version #publish-version ## Publish the `{version}` ans `latest` tagged containers to ECR
@echo "Publishing done"
publish-latest: ## Publish the `latest` taged container to ECR
@echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
#docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
publish-version: tag-version ## Publish the `{version}` taged container to ECR
@echo 'publish latest to $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
#docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION)
push: login ## push after login @echo 'push latest to $(REG_NAME)/$(REPO)/$(APP_NAME):latest'
docker tag $(APP_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest
# ==========================================================================
#
release-alt: build-alt publish-alt ## Make a release by building and publishing the `{version}` ans `latest` tagged containers to ECR
publish-alt: login publish-alt-latest #publish-alt-version ## Publish the `{version}` ans `latest` tagged containers to ECR
push-alt: login tag-alt-latest ## push after login
#docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
publish-alt-latest: #tag-alt-latest ## Publish the `latest` taged container to ECR
#docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest
docker tag $(APP_NAME)_$(ALT_NAME):latest $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest
publish-alt-version: tag-alt-version ## Publish the `latest` taged container to ECR
#docker push $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
docker push $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION)
# ==========================================================================
#
login-dockerhub: ## login to hub.docker.com
@echo 'docker hub login :'
docker login
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)
# ==========================================================================
#
clean-tags:
docker rmi $(REPO)/$(APP_NAME):latest || true
docker rmi $(GL_GROUP)/$(APP_NAME):latest || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME):latest || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true
docker rmi $(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(GL_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
clean:
docker rmi $(REPO_NAME)/$(APP_NAME) || true
docker rmi $(REPO_NAME)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(REPO_NAME)/$(APP_NAME):$(VERSION) || true
docker rmi $(REPO)/$(APP_NAME) || true
docker rmi $(REPO)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(REPO)/$(APP_NAME):$(VERSION) || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):latest || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(REG_NAME)/$(REPO)/$(APP_NAME) || true
docker rmi $(DH_ORG)/$(APP_NAME) || true
docker rmi $(DH_ORG)/$(APP_NAME):$(TAG_VERSION) || true
docker rmi $(DH_ORG)/$(APP_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):latest || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):latest || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME):$(VERSION) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME) || true
docker rmi $(GL_REG_GROUP)/$(APP_NAME)_$(ALT_NAME):$(VERSION) || true
docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME) || true
docker rmi $(GL_REG_NAME)/$(REG_USER)/$(APP_NAME):$(VERSION) || true
#docker rmi $(APP_NAME) || true
version: ## Output the current version
@echo $(VERSION)
# ==========================================================================
#
info: ## Output the current version
@echo 'VERSION = $(VERSION) '
@echo 'REG_USER = $(REG_USER) '
@echo 'REG_NAME = $(REG_NAME) '
@echo 'ALT_NAME = $(ALT_NAME) '
@echo 'APP_NAME = $(APP_NAME) '
@echo 'REPO_NAME = $(REPO_NAME) '
@echo 'DH_ORG = $(DH_ORG) '
@echo 'GL_GROUP = $(GL_GROUP) '
@echo 'GL_REG_GROUP = $(GL_REG_GROUP)'
@echo 'GL_REG_NAME = $(GL_REG_NAME) '
@echo 'REPO = $(REPO) '
@echo 'TAG_VERSION = $(TAG_VERSION) '
ls: ## list all docker images
docker images
REG_TOKEN ?= ${CI_IMAGE_BUILD_PAT}
REG_USER ?= whit
REG_HOST ?= eicweb.phy.anl.gov
REG_NAME ?= eicweb.phy.anl.gov:4567
REG_PORT ?= 4567
REG_URL ?= https://$(REG_HOST)
# name of alternate build:
# Dockerfile.$(ALT_NAME) --> $(APP_NAME)_${ALT_NAME}
ALT_NAME ?= broadwell
APP_NAME = eic
REPO_NAME = eic
DH_ORG = eic
GL_GROUP = eic_container
GL_REG_GROUP = containers/eic_container
GL_REG_NAME = $(REG_NAME)
REPO = $(REG_USER)
TAG_VERSION = latest
Bootstrap: docker
From: eicweb.phy.anl.gov:4567/containers/eic_container/eic:latest
%help
EIC software container.
Tools:
- eic_shell : Bash shell in this container
- root : Root shell in the container
- ipython : Python shell in the container
%labels
Maintainer "Whitney Armstrong, Sylvester Joosten"
Version v2.0
%post -c /bin/bash
echo " -------------------------------------------------"
echo " ===> Image setup complete"
echo " -------------------------------------------------"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment