Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit 471b524

Browse files
committed
allow different build numbers
1 parent eb8dba8 commit 471b524

File tree

5 files changed

+33
-19
lines changed

5 files changed

+33
-19
lines changed

configs/intelpython2_full/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ MAINTAINER Robert Cohn <[email protected]>
3131
ENV ACCEPT_INTEL_PYTHON_EULA=yes
3232

3333
RUN conda config --add channels intel \
34-
&& conda install -y -q intelpython2_full=2017.0.3=3 python=2 \
34+
&& conda install -y -q intelpython2_full=2017.0.3=1 python=2 \
3535
&& apt-get update -qqq \
3636
&& apt-get install -y -q g++

configs/intelpython3_full/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ MAINTAINER Robert Cohn <[email protected]>
3131
ENV ACCEPT_INTEL_PYTHON_EULA=yes
3232

3333
RUN conda config --add channels intel \
34-
&& conda install -y -q intelpython3_full=2017.0.3=3 python=3 \
34+
&& conda install -y -q intelpython3_full=2017.0.3=1 python=3 \
3535
&& apt-get update -qqq \
3636
&& apt-get install -y -q g++

images.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,16 @@ def parse_name(name):
7070

7171
class Conf(dict):
7272
'''Docker image configuration'''
73-
def __init__(self,pyver=None,package=None,name=None):
73+
def __init__(self,pyver=None,package=None,build_number=None,name=None):
7474
if name:
7575
(pyver,package) = parse_name(name)
7676
self['pyver'] = pyver
7777
self['package'] = package
7878
# github tag & docker tag is update_number-build_number, e.g. 2017.0.1-1
7979
# conda package spec is update_number=build_number, e.g. intelpython2_core=2017.0.1=1
8080
self['update_number'] = '2017.0.3'
81-
self['build_number'] = '3'
81+
if build_number:
82+
self['build_number'] = '=' + str(build_number)
8283

8384
def name(self):
8485
return 'intelpython%d_%s' % (self['pyver'],self['package'])
@@ -100,12 +101,19 @@ def test(self):
100101
subprocess.check_call(cmd, shell=True)
101102

102103
# Add new configurations here
103-
all_confs = [Conf(2,'core'),
104-
Conf(2,'full'),
105-
Conf(3,'core'),
106-
Conf(3,'full')
104+
all_confs = [Conf(2,'core',3),
105+
Conf(2,'full',1),
106+
Conf(3,'core',3),
107+
Conf(3,'full',1)
107108
]
108109

110+
def get_conf(name):
111+
for c in all_confs:
112+
if c.name() == name:
113+
return c
114+
print('Could not find conf: ',name)
115+
return None
116+
109117
def main():
110118
conf_names = [conf.name() for conf in all_confs]
111119
parser = argparse.ArgumentParser(description='generate the configurations for docker images')
@@ -128,7 +136,7 @@ def main():
128136

129137
for n in args.conf:
130138
print('Processing:',n)
131-
c = Conf(name=n)
139+
c = get_conf(n)
132140
if args.gen:
133141
print(' gen')
134142
c.gen()

tpls/tpl.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ MAINTAINER Robert Cohn <[email protected]>
3131
ENV ACCEPT_INTEL_PYTHON_EULA=yes
3232

3333
RUN conda config --add channels intel \
34-
&& conda install -y -q intelpython{{pyver}}_{{package}}={{update_number}}={{build_number}} python={{pyver}} \
34+
&& conda install -y -q intelpython{{pyver}}_{{package}}={{update_number}}{{build_number}} python={{pyver}} \
3535
&& apt-get update -qqq \
3636
&& apt-get install -y -q g++

tpls/tpl.README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
Docker images for [Intel Distribution for Python](https://software.intel.com/en-us/intel-distribution-for-python)
22

3+
The image defaults to starting with a bash shell. Intel Python is on the path. There is 1 image for every install configuration.
4+
5+
Images:
6+
7+
* intelpython2_core
8+
* intelpython2_full
9+
* intelpython3_core
10+
* intelpython3_full
11+
12+
You usually want the 'latest' tag, but the docker image tag can be used to request a specific package. For example:
13+
14+
docker pull intelpython2_core:2017.0.3-1
15+
16+
Will get an image that uses the conda package: intelpython3_core-2017.0.3-3
17+
318
Tags:
419

520
* 2017.0.3-3, 2017.0.3, latest
@@ -9,14 +24,5 @@ Tags:
924
* 2017.0.1-1, 2017.0.1
1025
* 2017.0.0-2, 2017.0.0
1126

12-
There is 1 image for every install configuration.
13-
14-
Images:
15-
16-
* intelpython2_core
17-
* intelpython2_full
18-
* intelpython3_core
19-
* intelpython3_full
2027

21-
The image defaults to starting with a bash shell. Intel Python is on the path.
2228

0 commit comments

Comments
 (0)