Skip to content

Commit fbd4f78

Browse files
committed
added licensing headers and docstring
1 parent 6112814 commit fbd4f78

3 files changed

Lines changed: 65 additions & 1 deletion

File tree

easybuild/tools/containers/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# #
2+
# Copyright 2009-2018 Ghent University
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
8+
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# https://github.com/easybuilders/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
# #
25+
"""
26+
Dispatch function for container packages
27+
28+
:author: Shahzeb Siddiqui (Pfizer)
29+
:author: Kenneth Hoste (HPC-UGent)
30+
:author: Mohamed Abidi (Bright Computing)
31+
"""
132
from vsc.utils import fancylogger
233

334
from easybuild.tools.config import CONT_TYPE_SINGULARITY, CONT_TYPE_DOCKER

easybuild/tools/containers/docker.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
# #
2+
# Copyright 2009-2018 Ghent University
3+
#
4+
# This file is part of EasyBuild,
5+
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
6+
# with support of Ghent University (http://ugent.be/hpc),
7+
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
8+
# Flemish Research Foundation (FWO) (http://www.fwo.be/en)
9+
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
10+
#
11+
# https://github.com/easybuilders/easybuild
12+
#
13+
# EasyBuild is free software: you can redistribute it and/or modify
14+
# it under the terms of the GNU General Public License as published by
15+
# the Free Software Foundation v2.
16+
#
17+
# EasyBuild is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
24+
# #
25+
"""
26+
Support for generating docker container recipes and creating container images
27+
28+
:author Mohamed Abidi (Bright Computing)
29+
"""
130
import os
231
import shutil
332
import tempfile
@@ -95,6 +124,7 @@
95124

96125

97126
def check_docker_containerize():
127+
"""Validates the required conditions are satisfied for a docker recipe generation and image creation"""
98128
docker_container_base = build_option('container_base') or DEFAULT_DOCKER_BASE_IMAGE
99129

100130
if docker_container_base not in [DOCKER_BASE_IMAGE_UBUNTU, DOCKER_BASE_IMAGE_CENTOS]:
@@ -131,6 +161,7 @@ def _det_os_deps(easyconfigs):
131161

132162

133163
def generate_dockerfile(easyconfigs, container_base):
164+
"""Generate a dockerfile out of the passed easybuild modules"""
134165
os_deps = _det_os_deps(easyconfigs)
135166

136167
module_naming_scheme = ActiveMNS()
@@ -173,6 +204,7 @@ def generate_dockerfile(easyconfigs, container_base):
173204

174205

175206
def build_docker_image(easyconfigs, dockerfile):
207+
"""Generates a docker image from a dockerfile"""
176208
ec = easyconfigs[-1]['ec']
177209

178210
module_naming_scheme = ActiveMNS()
@@ -190,6 +222,7 @@ def build_docker_image(easyconfigs, dockerfile):
190222

191223

192224
def docker_containerize(easyconfigs):
225+
"""Entry point to docker recipe and image creation"""
193226

194227
check_docker_containerize()
195228

easybuild/tools/containers/singularity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# along with EasyBuild. If not, see <http://www.gnu.org/licenses/>.
2323
#
2424
"""
25-
Support for generating container recipes and creating container images
25+
Support for generating singularity container recipes and creating container images
2626
2727
:author: Shahzeb Siddiqui (Pfizer)
2828
:author: Kenneth Hoste (HPC-UGent)

0 commit comments

Comments
 (0)