Skip to content
Snippets Groups Projects
Commit a8d0bd94 authored by Sebastian Achilles's avatar Sebastian Achilles
Browse files

Merge branch 'MATLAB' into '2023'

[2023] MATLAB (update to 2023b), fix JupyterProxy

See merge request software-team/easybuild!2204
parents a2627512 9db3e78a
No related branches found
No related tags found
No related merge requests found
...@@ -59,21 +59,23 @@ exts_list = [ ...@@ -59,21 +59,23 @@ exts_list = [
('matlab-proxy', '0.8.0', { ('matlab-proxy', '0.8.0', {
'patches': [ 'patches': [
'noVersionCheck.patch', 'noVersionCheck.patch',
'matlabproxy_timeout.patch',
], ],
'checksums': [ 'checksums': [
('sha256', '965b0b7cfa6314638435089f211106c114b838e8f4945cb5f5dacb15c0cdf71f'), ('sha256', '965b0b7cfa6314638435089f211106c114b838e8f4945cb5f5dacb15c0cdf71f'),
('sha256', 'c21ba8969da77c88a266c97dc73dc64dc7a8f4fc20391f311bb4a6992d6e812c'), ('sha256', 'c21ba8969da77c88a266c97dc73dc64dc7a8f4fc20391f311bb4a6992d6e812c'),
('sha256', '4f7d9f67566496223f01156f168e02af61b6b0a441afcaf7258b08f6ec79762d'),
], ],
}), }),
('jupyter-matlab-proxy', '0.8.0', { ('jupyter-matlab-proxy', '0.8.0', {
'source_urls': ['https://github.com/mathworks/jupyter-matlab-proxy/archive/'], 'source_urls': ['https://github.com/mathworks/jupyter-matlab-proxy/archive/'],
'source_tmpl': 'v%(version)s.tar.gz', 'source_tmpl': 'v%(version)s.tar.gz',
'patches': [ 'patches': [
'timeout.patch', 'jupytermatlabproxy_timeout.patch',
], ],
'checksums': [ 'checksums': [
('sha256', 'b1785c8bed32d187c2fa15d921d047dd7483ec20442cdc5f34c0aad1ca06bac5'), ('sha256', 'b1785c8bed32d187c2fa15d921d047dd7483ec20442cdc5f34c0aad1ca06bac5'),
('sha256', 'f44b7eee2d73b492a885c6b051b755330ff973e083d341933d28172156f0ff16'), ('sha256', '4d15cc52352dc0cdeb03cc01285cf01cfe01393f3eee77fe1c2e205d691a5b8d'),
], ],
}), }),
] ]
......
easyblock = 'PythonBundle'
name = 'JupyterProxy-Matlab'
version = '0.9.0'
local_jupyterver = '2023.3.6'
versionsuffix = '-' + local_jupyterver
# only users of the UNIX-group 'matlab' must have access
# group = 'matlab'
homepage = 'https://github.com/mathworks/jupyter-matlab-proxy'
description = """The MATLAB integration for Jupyter enables you to open a MATLAB desktop
in a web browser tab, directly from your Jupyter environment.
"""
toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.38'),
# check for existance
# ('MATLAB', '2023a'),
# ('XServer', '21.1.6'),
]
dependencies = [
('Python', '3.10.4'),
('JupyterLab', local_jupyterver),
]
exts_defaultclass = 'PythonPackage'
exts_default_options = {
'filter': ('python -c "import %(ext_name)s"', ''),
'download_dep_fail': True,
'source_urls': [PYPI_SOURCE],
'use_pip': True,
'sanity_pip_check': True,
'use_pip_for_deps': False,
}
exts_list = [
# enable classic jupyter ####
('jupyter_contrib_core', '0.4.2', {
'checksums': [('sha256', '1887212f3ca9d4487d624c0705c20dfdf03d5a0b9ea2557d3aaeeb4c38bdcabb')],
}),
('jupyter_highlight_selected_word', '0.2.0', {
'checksums': [('sha256', '9fa740424859a807950ca08d2bfd28a35154cd32dd6d50ac4e0950022adc0e7b')],
}),
('jupyter_nbextensions_configurator', '0.6.1', {
'checksums': [('sha256', '4b9e1270ccc1f8e0a421efb8979a737f586813023a4855b9453f61c3ca599b82')],
}),
('jupyter_contrib_nbextensions', '0.7.0', {
'checksums': [('sha256', '06e33f005885eb92f89cbe82711e921278201298d08ab0d886d1ba09e8c3e9ca')],
}),
# core-packages ####
('aiohttp-session', '2.12.0', {
'checksums': [('sha256', '0ccd11a7c77cb9e5a61f4daacdc9170d561112f9cfaf9e9a2d9867c0587d1950')],
}),
('matlab-proxy', '0.9.0', {
'checksums': [
('sha256', 'd8e76ef8c5d89aab286ad5bad65ecbdde1dca8803e2101f7d13e6f3ee3cb5cb5'),
],
}),
('jupyter-matlab-proxy', '0.8.0', {
'source_urls': ['https://github.com/mathworks/jupyter-matlab-proxy/archive/'],
'source_tmpl': 'v%(version)s.tar.gz',
'patches': [
'jupytermatlabproxy_timeout.patch',
],
'checksums': [
('sha256', 'b1785c8bed32d187c2fa15d921d047dd7483ec20442cdc5f34c0aad1ca06bac5'),
('sha256', '4d15cc52352dc0cdeb03cc01285cf01cfe01393f3eee77fe1c2e205d691a5b8d'),
],
}),
]
postinstallcmds = [
(
'{ cat > %(installdir)s/bin/matlab; } << EOF \n'
'#!/bin/bash \n'
'\n'
'# Load required modules \n'
'module purge \n'
'module load Stages/${STAGE} \n'
'module load GCCcore/.11.3.0 \n'
'module load MATLAB \n'
'module load XServer/21.1.6 \n'
'\n'
'matlab "\$@" \n'
'\n'
'EOF'
),
'chmod +x %(installdir)s/bin/matlab',
(
'{ cat > %(installdir)s/bin/Xvfb; } << EOF \n'
'#!/bin/bash \n'
'\n'
'# Load required modules \n'
'# and ensure stderr stays empty as matlab-proxy seems to fail if not \n'
'module purge 2>&1 \n'
'module load Stages/${STAGE} 2>&1 \n'
'module load GCCcore/.11.3.0 2>&1 \n'
'module load MATLAB 2>&1 \n'
'module load XServer/21.1.6 2>&1 \n'
'\n'
'Xvfb "\$@" 2>&1\n'
'\n'
'EOF'
),
'chmod +x %(installdir)s/bin/Xvfb'
]
modextravars = {
'MWI_USE_EXISTING_LICENSE': 'True',
'MWI_PROCESS_START_TIMEOUT': '600',
}
# Jupyter-matlab-kernel DISABLED:
# https://github.com/mathworks/jupyter-matlab-proxy/issues/62
modextrapaths = {
# 'MWI_CUSTOM_MATLAB_ROOT': 'lib/python%(pyshortver)s/site-packages/jupyter_matlab_proxy/',
# 'JUPYTER_PATH': ['share/jupyter'], # add search path for kernelspecs
}
# Ensure that the user-specific $HOME/.local/share/jupyter is first entry in JUPYTHER_PATH
# modluafooter = """
# prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
# """
sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}
moduleclass = 'tools'
diff -Naur 0.7.1.orig/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.7.1/src/jupyter_matlab_proxy/__init__.py 0.7.1/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.7.1/src/jupyter_matlab_proxy/__init__.py diff -Naur 0.8.0.orig/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.8.0/src/jupyter_matlab_proxy/__init__.py 0.8.0/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.8.0/src/jupyter_matlab_proxy/__init__.py
--- 0.7.1.orig/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.7.1/src/jupyter_matlab_proxy/__init__.py 2023-08-21 14:27:12.000000000 +0200 --- 0.8.0.orig/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.8.0/src/jupyter_matlab_proxy/__init__.py 2023-10-16 13:08:25.138590609 +0200
+++ 0.7.1/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.7.1/src/jupyter_matlab_proxy/__init__.py 2023-08-29 22:16:29.568376240 +0200 +++ 0.8.0/GCCcore-11.3.0-2023.3.6/jupytermatlabproxy/jupyter-matlab-proxy-0.8.0/src/jupyter_matlab_proxy/__init__.py 2023-10-16 12:55:47.863830331 +0200
@@ -48,7 +48,7 @@ @@ -93,7 +93,7 @@
"--config", "--config",
config["extension_name"], config["extension_name"],
], ],
......
diff -Naur 0.8.0.orig/GCCcore-11.3.0-2023.3.6/matlabproxy/matlab-proxy-0.8.0/matlab_proxy/app_state.py 0.8.0/GCCcore-11.3.0-2023.3.6/matlabproxy/matlab-proxy-0.8.0/matlab_proxy/app_state.py
--- 0.8.0.orig/GCCcore-11.3.0-2023.3.6/matlabproxy/matlab-proxy-0.8.0/matlab_proxy/app_state.py 2023-10-16 13:09:23.368725542 +0200
+++ 0.8.0/GCCcore-11.3.0-2023.3.6/matlabproxy/matlab-proxy-0.8.0/matlab_proxy/app_state.py 2023-10-16 12:57:02.458981541 +0200
@@ -36,7 +36,7 @@
MATLAB_PORT_CHECK_DELAY_IN_SECONDS = 1
# The maximum amount of time in seconds the Embedded Connector can take
# for launching, before the matlab-proxy server concludes that something is wrong.
- EMBEDDED_CONNECTOR_MAX_STARTUP_DURATION_IN_SECONDS = 120
+ EMBEDDED_CONNECTOR_MAX_STARTUP_DURATION_IN_SECONDS = 600
def __init__(self, settings):
"""Parameterized constructor for the AppState class.
# Attention: before calling 'eb':
# export EB_MATLAB_KEY as fileInstallationKey
# or export EB_MATLAB_LICFILE as license file
name = 'MATLAB'
version = '2023b'
# only users of the UNIX-group 'matlab' must have access
group = 'matlab'
homepage = 'https://www.mathworks.com/products/matlab.html'
description = """MATLAB is a high-level language and interactive environment
that enables you to perform computationally intensive tasks faster than with
traditional programming languages such as C, C++, and Fortran.
"""
toolchain = {'name': 'GCCcore', 'version': '11.3.0'}
sources = [SOURCELOWER_TAR_GZ]
checksums = ['d96b9b3b36fad31a68061b7e64f6e0c7c3c072f85881290877cc5fc675ccb06f']
dependencies = [
('X11', '20220504'), # mlab req. libXt.so which is not on the computes
('Java', '11', '', SYSTEM)
]
java_options = '-Xmx2048m'
# if we remove
# ```
# prepend_path("LD_LIBRARY_PATH", pathJoin(root, "runtime/glnxa64"))
# prepend_path("LD_LIBRARY_PATH", pathJoin(root, "bin/glnxa64"))
# prepend_path("LD_LIBRARY_PATH", pathJoin(root, "sys/os/glnxa64"))
# ```
# from the lua-Script. (needs a modification of eb-block-matlab)
# postinstallcmds = [
# # create a wrapper script to ensure we do not mess up the environment
# # because MATLAB comes with its own libstdc++ and other system libs
# # in $EBROOTMATLAB/sys/os/glnxa64/
# 'mv %(installdir)s/bin/matlab %(installdir)s/bin/matlab.bin ',
# (
# '{ cat > %(installdir)s/bin/matlab; } << EOF\n'
# '#!/bin/bash\n'
# '\n'
# 'MYPATH=\$(readlink -f \$0)\n'
# 'export MATLAB_PATH=\$(realpath \$(dirname "\$MYPATH")/..)\n'
# '\n'
# 'export LD_LIBRARY_PATH=\$MATLAB_PATH/runtime/glnxa64:\$LD_LIBRARY_PATH\n'
# 'export LD_LIBRARY_PATH=\$MATLAB_PATH/bin/glnxa64:\$LD_LIBRARY_PATH\n'
# 'export LD_LIBRARY_PATH=\$MATLAB_PATH/sys/os/glnxa64:\$LD_LIBRARY_PATH\n'
# '\n'
# '"\$MATLAB_PATH/bin/matlab.bin" "\$@"\n'
# 'EOF'
# ),
# 'chmod +x %(installdir)s/bin/matlab',
# ]
modloadmsg = """
Attention: This software is RESTRICTED to ACADEMIC users who are members of the group matlab\n.
"""
modextravars = {
'MATLAB_ROOT': '%(installdir)s',
'MLM_LICENSE_FILE': '27000@zam2076.zam.kfa-juelich.de',
}
sanity_check_paths = {
'files': ['bin/matlab', 'bin/glnxa64/MATLAB'],
'dirs': [],
}
moduleclass = 'math'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment