-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathJupyterKernel-PyDeepLearning-2025.1-GCCcore-13.3.0-4.3.4.eb
More file actions
162 lines (145 loc) · 5.74 KB
/
Copy pathJupyterKernel-PyDeepLearning-2025.1-GCCcore-13.3.0-4.3.4.eb
File metadata and controls
162 lines (145 loc) · 5.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# This file is part of JSC's public easybuild repository (https://github.com/easybuilders/jsc)
easyblock = 'PythonBundle'
name = 'JupyterKernel-PyDeepLearning'
version = '2025.1'
local_jupyterver = '4.3.4'
versionsuffix = '-' + local_jupyterver
homepage = 'https://www.fz-juelich.de'
description = """
Special DeepLearning kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
toolchain = {'name': 'GCCcore', 'version': '13.3.0'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.42'),
# just ensure they exist
('CUDA', '12', '', SYSTEM),
('OpenCV', '4.11.0', '-contrib', ('gcccoreflexiblas', '13.3.0-3.4.4')),
('protobuf-python', '5.28.0'),
('PyTorch', '2.5.1', '', ('gcccoreflexiblas', '13.3.0-3.4.4')),
('PyTorch-Lightning', '2.5.0.post0', '', ('gcccoreflexiblas', '13.3.0-3.4.4')),
('torchvision', '0.20.1', '', ('gcccoreflexiblas', '13.3.0-3.4.4')),
('torchaudio', '2.5.1', '', ('gcccoreflexiblas', '13.3.0-3.4.4')),
('tensorboard', '2.18.0', '', ('gcccoreflexiblas', '13.3.0-3.4.4')),
]
dependencies = [
('Python', '3.12.3'),
('JupyterLab', local_jupyterver),
]
components = [
('logos', '1.0', {
'easyblock': 'Binary',
'sources': [
{'filename': 'logo-32x32.png', 'extract_cmd': "cp %s %%(builddir)s/"},
{'filename': 'logo-64x64.png', 'extract_cmd': "cp %s %%(builddir)s/"},
{'filename': 'logo-128x128.png', 'extract_cmd': "cp %s %%(builddir)s/"},
],
'checksums': [
{'logo-32x32.png': 'd093715a38f058c78455c0fc15e3eabe18f05a9226574da92a42bb94a84e6dcf'},
{'logo-64x64.png': '1429763bb9f1231696b11298a7cb34689941f49164b17150fde8b5ede5feb903'},
{'logo-128x128.png': '96d0eac3b9da9b31ac2523e8c0aa64571ae165267443adcd87a8796276aea96c'},
],
}),
]
exts_default_options = {
'source_urls': [PYPI_SOURCE],
'use_pip': True,
'sanity_pip_check': False, # skip as it requires protobuf, TensorFlow
'download_dep_fail': True,
'use_pip_for_deps': False,
}
exts_list = [
('lmdb', '1.6.2', {
'checksums': ['d28e3fa59935ff688858760ec52f202ecb8c1089a3f68d1f162ea3078d151e73'],
}),
('gviz_api', '1.10.0', {
'checksums': ['846692dd8cc73224fc31b18e41589bd934e1cc05090c6576af4b4b26c2e71b90'],
}),
('tensorboard_plugin_profile', '2.18.0', {
'checksums': ['6246019aa31e9563e5baf6f67a61c6615e017b705492f6622677acda8cec2108'],
}),
('tensorflow_hub', '0.16.1', {
'modulename': False,
'source_tmpl': 'tensorflow_hub-%(version)s-py2.py3-none-any.whl',
'unpack_sources': False,
'checksums': ['e10c184b3d08daeafada11ffea2dd46781725b6bef01fad1f74d6634ad05311f'],
}),
]
local_kernel_dir = 'pydeeplearning'
local_kernel_name = 'PyDeepLearning-%s' % version
modextrapaths = {
'JUPYTER_PATH': ['share/jupyter'], # add search path for kernelspecs
'HOROVOD_MPI_THREADS_DISABLE': ['1'], # no mpi by default
}
# Ensure that the user-specific $HOME/.local/share/jupyter is always first entry in JUPYTHER_PATH
modluafooter = """
remove_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
# create kernel skeleton
(
'python -m ipykernel install --name=%s --prefix=%%(installdir)s && '
'rm -f %%(installdir)s/share/jupyter/kernels/%s/logo-svg.svg && '
'mv %%(installdir)s/logo-32x32.png %%(installdir)s/share/jupyter/kernels/%s/logo-32x32.png && '
'mv %%(installdir)s/logo-64x64.png %%(installdir)s/share/jupyter/kernels/%s/logo-64x64.png && '
'mv %%(installdir)s/logo-128x128.png %%(installdir)s/share/jupyter/kernels/%s/logo-128x128.png'
) % (local_kernel_dir, local_kernel_dir, local_kernel_dir, local_kernel_dir, local_kernel_dir),
# write kernel.sh
(
'{ cat > %%(installdir)s/share/jupyter/kernels/%s/kernel.sh; } << EOF\n'
'#!/bin/bash \n'
'\n'
'# Load required modules \n'
'module purge \n'
'module load Stages/${STAGE} \n'
'module load GCCcore/.13.3.0 \n'
'module load %s/.%s%s \n'
'\n'
'module load OpenCV \n'
'module load protobuf-python/.5.28.0 \n'
'module load PyTorch \n'
'module load PyTorch-Lightning \n'
'module load torchvision \n'
'module load torchaudio \n'
'module load tensorboard \n'
'\n'
'export PYTHONPATH=%%(installdir)s/lib/python%%(pyshortver)s/site-packages:\$PYTHONPATH \n'
'exec python -m ipykernel \$@\n'
'\n'
'EOF'
) % (local_kernel_dir, name, version, versionsuffix),
'chmod +x %%(installdir)s/share/jupyter/kernels/%s/kernel.sh' % local_kernel_dir,
# write kernel.json
(
'{ cat > %%(installdir)s/share/jupyter/kernels/%s/kernel.json; } << \'EOF\'\n'
'{ \n'
' "argv": [ \n'
' "%%(installdir)s/share/jupyter/kernels/%s/kernel.sh", \n'
' "-m", \n'
' "ipykernel_launcher", \n'
' "-f", \n'
' "{connection_file}" \n'
' ], \n'
' "display_name": "%s", \n'
' "language": "python", \n'
' "name": "%s", \n'
' "metadata": { \n'
' "debugger": true \n'
' } \n'
'}\n'
'EOF'
) % (local_kernel_dir, local_kernel_dir, local_kernel_name, local_kernel_name),
]
sanity_check_paths = {
'files': [
'share/jupyter/kernels/%s/kernel.sh' % local_kernel_dir,
'share/jupyter/kernels/%s/kernel.json' % local_kernel_dir,
],
'dirs': [
'share/jupyter/kernels/',
],
}
moduleclass = 'tools'