-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathJupyterKernel-PyVisualization-2025.2-GCCcore-13.3.0-4.3.4.eb
More file actions
141 lines (125 loc) · 4.59 KB
/
Copy pathJupyterKernel-PyVisualization-2025.2-GCCcore-13.3.0-4.3.4.eb
File metadata and controls
141 lines (125 loc) · 4.59 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
# This file is part of JSC's public easybuild repository (https://github.com/easybuilders/jsc)
easyblock = 'PythonBundle'
name = 'JupyterKernel-PyVisualization'
version = '2025.2'
local_jupyterver = '4.3.4'
versionsuffix = '-' + local_jupyterver
homepage = 'https://www.fz-juelich.de'
description = """
Special Jupyter kernel including visualization tools.
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'),
# check for existance
# ('ParaView', '5.13.2', '-EGL', ('gpsmpi', '2024a')),
# ('Conduit', '0.9.3'),
# ('Ascent', '20250201'),
('trame', '3.8.0'),
# ('PyVista', ''),
]
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': 'e6c2d297ec431a4a1c55cb53b7295107d99447ce1f7242892e31074aa32f25e0'},
{'logo-64x64.png': '49a73d5afec0b6f485fa4539c6199f12e930a4a62188a5ed7b8d538ece9bd264'},
{'logo-128x128.png': 'd9c64f445a541626384234212278a57e565225ec0954e281916a35ed130bece3'},
]
}),
]
exts_default_options = {
'source_urls': [PYPI_SOURCE],
'use_pip': True,
'sanity_pip_check': True,
'download_dep_fail': True,
'use_pip_for_deps': False,
}
exts_list = [
]
local_kernel_dir = 'pyvisualization'
local_kernel_name = 'PyVisualization-%s' % version
modextrapaths = {
'JUPYTER_PATH': ['share/jupyter'], # add search path for kernelspecs
}
# Ensure that the user-specific $HOME/.local/share/jupyter is always first entry in JUPYTER_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 GCC/13.3.0 \n'
'module load ParaStationMPI \n'
'module load %s/.%s%s \n'
'\n'
'module load ParaView/5.13.2-EGL \n'
'module load Conduit \n'
'module load Ascent \n'
'module load trame \n'
'# module load PyVista \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'