-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathJupyterKernel-Octave-9.3.0-GCCcore-13.3.0-4.3.4.eb
More file actions
96 lines (82 loc) · 2.93 KB
/
Copy pathJupyterKernel-Octave-9.3.0-GCCcore-13.3.0-4.3.4.eb
File metadata and controls
96 lines (82 loc) · 2.93 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
# This file is part of JSC's public easybuild repository (https://github.com/easybuilders/jsc)
easyblock = 'PythonBundle'
name = 'JupyterKernel-Octave'
version = '9.3.0'
local_octavever = version
local_jupyterver = '4.3.4'
versionsuffix = '-' + local_jupyterver
homepage = 'https://github.com/Calysto/octave_kernel'
description = """
Native Octave 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'),
('hatchling', '1.24.2'),
('Octave', local_octavever, '', ('gcccoreflexiblas', '13.3.0-3.4.4')), # ensure it is available
]
dependencies = [
('Python', '3.12.3'),
('jupyter-server', '2.15.0'), # for ipykernel
]
sanity_pip_check = True
use_pip = True
exts_list = [
('metakernel', '0.30.2', {
'checksums': ['4a27dfd853b849f0128242c55204ee597a5a8d864294f26084baf2fbc814d5a4'],
}),
('octave_kernel', '0.36.0', {
'checksums': ['925882f8915c86ed75b6db8e1341deed980dba0be73bf07365d3ea08961a1ddb'],
}),
]
local_kernel_dir = 'octave'
local_kernel_name = 'Octave-%s' % local_octavever
modextrapaths = {
'JUPYTER_PATH': ['share/jupyter'], # add search path for kernelspecs
}
# 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.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'
'\n'
'module load Python/%%(pyver)s \n'
'module load JupyterLab/%s \n'
'module load Octave/%s \n'
'\n'
'export PYTHONPATH=%%(installdir)s/lib/python%%(pyshortver)s/site-packages:\${PYTHONPATH} \n'
'\n'
'exec python \$@\n'
'EOF'
) % (local_kernel_dir, local_jupyterver, local_octavever),
'chmod +x %%(installdir)s/share/jupyter/kernels/%s/kernel.sh' % local_kernel_dir,
# replace `"python"` with `"[..]/kernel.sh"
(
'sed -i \'s#"python"#"%%(installdir)s/share/jupyter/kernels/%s/kernel.sh"#\' '
' %%(installdir)s/share/jupyter/kernels/%s/kernel.json'
) % (local_kernel_dir, local_kernel_dir),
]
sanity_check_paths = {
'files': [
'share/jupyter/kernels/%s/kernel.sh' % local_kernel_dir,
'share/jupyter/kernels/%s/kernel.json' % local_kernel_dir,
],
'dirs': [
'lib/python%(pyshortver)s/site-packages',
'share/jupyter/kernels/octave/',
],
}
moduleclass = 'tools'