Skip to content
Snippets Groups Projects
Commit d839965d authored by Alexandre Strube's avatar Alexandre Strube
Browse files

Merge branch '2020' of...

parents cef89839 53b29ada
No related branches found
No related tags found
No related merge requests found
Showing
with 1167 additions and 5 deletions
diff
--- notebook-6.0.3.orig/notebook/services/contents/filecheckpoints.py 2020-04-28 06:26:51.384296390 +0200
+++ notebook-6.0.3/notebook/services/contents/filecheckpoints.py 2020-04-28 06:30:55.139342947 +0200
@@ -14,7 +14,7 @@
from jupyter_core.utils import ensure_dir_exists
from ipython_genutils.py3compat import getcwd
-from traitlets import Unicode
+from traitlets import Unicode, Integer
from notebook import _tz as tz
@@ -28,6 +28,35 @@
you want file-based checkpoints with another ContentsManager.
"""
+ checkpoint_permissions = Integer(
+ 0o644,
+ config=True,
+ help="""The permission of your checkpoint files.
+
+ By default, it is 0o644
+ """,
+ )
+
+ restore_permissions = Integer(
+ 0o644,
+ config=True,
+ help="""The permission of a restored checkpoint.
+
+ By default, it is 0o644
+ """,
+ )
+
+ checkpoint_dir_umask = Integer(
+ 0o022,
+ config=True,
+ help="""The umask for the checkpoint directory.
+
+ Keep in mind that it depends on your system umask, too.
+
+ By default, it is 0o022
+ """,
+ )
+
checkpoint_dir = Unicode(
'.ipynb_checkpoints',
config=True,
@@ -50,21 +79,29 @@
# ContentsManager-dependent checkpoint API
def create_checkpoint(self, contents_mgr, path):
"""Create a checkpoint."""
+ original_umask = os.umask(self.checkpoint_dir_umask)
checkpoint_id = u'checkpoint'
src_path = contents_mgr._get_os_path(path)
dest_path = self.checkpoint_path(checkpoint_id, path)
self._copy(src_path, dest_path)
- return self.checkpoint_model(checkpoint_id, dest_path)
+ os.chmod(dest_path, self.checkpoint_permissions)
+ ret = self.checkpoint_model(checkpoint_id, dest_path)
+ os.umask(original_umask)
+ return ret
def restore_checkpoint(self, contents_mgr, checkpoint_id, path):
"""Restore a checkpoint."""
+ original_umask = os.umask(self.checkpoint_dir_umask)
src_path = self.checkpoint_path(checkpoint_id, path)
dest_path = contents_mgr._get_os_path(path)
self._copy(src_path, dest_path)
+ os.chmod(dest_path, self.restore_permissions)
+ os.umask(original_umask)
# ContentsManager-independent checkpoint API
def rename_checkpoint(self, checkpoint_id, old_path, new_path):
"""Rename a checkpoint from old_path to new_path."""
+ original_umask = os.umask(self.checkpoint_dir_umask)
old_cp_path = self.checkpoint_path(checkpoint_id, old_path)
new_cp_path = self.checkpoint_path(checkpoint_id, new_path)
if os.path.isfile(old_cp_path):
@@ -75,9 +112,11 @@
)
with self.perm_to_403():
shutil.move(old_cp_path, new_cp_path)
+ os.umask(original_umask)
def delete_checkpoint(self, checkpoint_id, path):
"""delete a file's checkpoint"""
+ original_umask = os.umask(self.checkpoint_dir_umask)
path = path.strip('/')
cp_path = self.checkpoint_path(checkpoint_id, path)
if not os.path.isfile(cp_path):
@@ -86,23 +125,29 @@
self.log.debug("unlinking %s", cp_path)
with self.perm_to_403():
os.unlink(cp_path)
+ os.umask(original_umask)
def list_checkpoints(self, path):
"""list the checkpoints for a given file
This contents manager currently only supports one checkpoint per file.
"""
+ original_umask = os.umask(self.checkpoint_dir_umask)
path = path.strip('/')
checkpoint_id = "checkpoint"
os_path = self.checkpoint_path(checkpoint_id, path)
if not os.path.isfile(os_path):
+ os.umask(original_umask)
return []
else:
- return [self.checkpoint_model(checkpoint_id, os_path)]
+ ret = self.checkpoint_model(checkpoint_id, os_path)
+ os.umask(original_umask)
+ return [ret]
# Checkpoint-related utilities
def checkpoint_path(self, checkpoint_id, path):
"""find the path to a checkpoint"""
+ original_umask = os.umask(self.checkpoint_dir_umask)
path = path.strip('/')
parent, name = ('/' + path).rsplit('/', 1)
parent = parent.strip('/')
@@ -117,16 +162,19 @@
with self.perm_to_403():
ensure_dir_exists(cp_dir)
cp_path = os.path.join(cp_dir, filename)
+ os.umask(original_umask)
return cp_path
def checkpoint_model(self, checkpoint_id, os_path):
"""construct the info dict for a given checkpoint"""
+ original_umask = os.umask(self.checkpoint_dir_umask)
stats = os.stat(os_path)
last_modified = tz.utcfromtimestamp(stats.st_mtime)
info = dict(
id=checkpoint_id,
last_modified=last_modified,
)
+ os.umask(original_umask)
return info
# Error Handling
easyblock = 'Bundle'
name = 'JupyterCollection'
version = '2020.2.5'
local_pysuffix = '-Python-3.8.5'
homepage = 'http://www.jupyter.org'
description = """
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
dependencies = [
('JupyterKernel-Bash', '0.7.1', '-' + version),
('JupyterKernel-Cling', '0.7', '-' + version),
('JupyterKernel-JavaScript', '5.2.0', '-' + version),
('JupyterKernel-Julia', '1.5.2', '-' + version),
('JupyterKernel-Octave', '6.1.0', '-' + version),
('JupyterKernel-PyParaView', '5.8.1', '-' + version),
# ('JupyterKernel-PyQuantum', '1.1', '-' + version),
('JupyterKernel-R', '4.0.2', '-' + version),
('JupyterKernel-Ruby', '2.7.1', '-' + version),
('JupyterProxy-XpraHTML5', '0.3.0', '-' + version),
('Jupyter', version, local_pysuffix),
]
skipsteps = ['configure', 'build', 'install', 'sanity_check']
moduleclass = 'tools'
easyblock = 'Bundle'
name = 'JupyterKernel-Bash'
version = '0.7.1'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-%(pyver)s'
homepage = 'https://github.com/takluyver/bash_kernel'
description = """
Native Bash kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, local_pysuffix),
]
local_common_opts = {
'req_py_majver': '3',
'req_py_minver': '0'
}
exts_defaultclass = 'PythonPackage'
exts_filter = ('python -c "import %(ext_name)s"', '')
exts_default_options = {
'download_dep_fail': True,
'source_urls': [PYPI_SOURCE],
'use_pip': True,
}
exts_list = [
# 0.7.2 fails with BackendUnavailable. Might be fixable --no-use-pep517
('bash_kernel', '0.7.1', dict(list(local_common_opts.items()) + [
('checksums', [('sha256', '29f895819e076e3f225e37034b70b5265a559e2964e020c942024f51ea6153e8')]),
('use_pip', True),
])),
]
local_jupyter_path = 'share/jupyter'
modextrapaths = {
'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'],
'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 = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
# Create virtual environment to ensure we install in the correct directory !!!
'python3 -m venv %(installdir)s --system-site-packages',
(
'{ cat > %%(builddir)s/env.sh; } << \'EOF\'\n'
'#!/bin/bash\n'
'source %%(installdir)s/bin/activate\n'
'export PYTHONPATH=%%(installdir)s/lib/python%%(pyshortver)s/site-packages:${PYTHONPATH}\n'
'export JUPYTER_DATA_DIR=%%(installdir)s/%s\n'
'EOF'
) % (local_jupyter_path),
# Jupyter Kernel: Bash - https://github.com/takluyver/bash_kernel
# installs bash_kernel in $JUPYTER_DATA_DIR/kernels
'source %(builddir)s/env.sh && ${EBROOTPYTHON}/bin/python3 -m bash_kernel.install --user',
'source %(builddir)s/env.sh && chmod -R o+x %(installdir)s/share',
# Ensure we remove the virtuel environment to avoid wrong search path for python packages
'rm %(installdir)s/pyvenv.cfg',
'rm -r %(installdir)s/bin',
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
sanity_check_paths = {
'files': [
'share/jupyter/kernels/bash/kernel.json',
],
'dirs': [
'lib/python%(pyshortver)s/site-packages',
'share/jupyter/kernels/bash/',
],
}
moduleclass = 'tools'
easyblock = 'Bundle'
name = 'JupyterKernel-Cling'
version = '0.7'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-%(pyver)s'
homepage = 'https://github.com/root-project/cling'
description = """
Native C kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, local_pysuffix),
('Cling', version),
]
local_jupyter_path = 'share/jupyter'
modextrapaths = {
'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'],
'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 = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
# Create virtual environment to ensure we install in the correct directory !!!
'python3 -m venv %(installdir)s --system-site-packages',
(
'{ cat > %%(builddir)s/env.sh; } << \'EOF\'\n'
'#!/bin/bash\n'
'source %%(installdir)s/bin/activate\n'
'export PYTHONPATH=%%(installdir)s/lib/python%%(pyshortver)s/site-packages:${PYTHONPATH}\n'
'export JUPYTER_DATA_DIR=%%(installdir)s/%s\n'
'EOF'
) % (local_jupyter_path),
# Jupyter Kernel: Cling (C++)
'source %(builddir)s/env.sh && pip3 install ${EBROOTCLING}/share/cling/Jupyter/kernel',
(
'source %(builddir)s/env.sh && '
' jupyter-kernelspec install --prefix=%(installdir)s ${EBROOTCLING}/share/cling/Jupyter/kernel/cling-cpp17'
),
# correct shebang to correct python binary
(
'source %(builddir)s/env.sh && '
' abs2python="#! ${EBROOTPYTHON}/bin/python" && '
' sed "1s@^.*@$abs2python@g" -i %(installdir)s/bin/jupyter-cling-kernel'
),
'source %(builddir)s/env.sh && chmod -R o+x %(installdir)s/share',
# Ensure we remove the virtuel environment to avoid wrong search path for python packages
'rm %(installdir)s/pyvenv.cfg',
'rm %(installdir)s/bin/python',
'rm %(installdir)s/bin/python3',
'rm %(installdir)s/bin/activate',
'rm %(installdir)s/bin/activate*',
'rm %(installdir)s/bin/easy_install*',
'rm %(installdir)s/bin/pip*',
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
sanity_check_paths = {
'files': [
'share/jupyter/kernels/cling-cpp17/kernel.json',
],
'dirs': [
# 'lib/python%(pyshortver)s/site-packages',
'share/jupyter/kernels/cling-cpp17/',
],
}
moduleclass = 'tools'
easyblock = 'Bundle'
name = 'JupyterKernel-JavaScript'
version = '5.2.0'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-3.8.5'
homepage = 'https://www.npmjs.com/package/ijavascript'
description = """
Native JavaScript kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Jupyter', local_jupyterver, local_pysuffix),
]
local_jupyter_path = 'share/jupyter'
modextrapaths = {
'PATH': ['bin'],
'NODE_PATH': ['lib/node_modules'], # npm´s search path to extra modules
'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 = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
(
'{ cat > %%(builddir)s/env.sh; } << \'EOF\'\n'
'#!/bin/bash\n'
'export PATH=%%(installdir)s/bin:${PATH}\n'
'export NODE_PATH=%%(installdir)s/lib/node_modules\n'
'export JUPYTER_DATA_DIR=%%(installdir)s/%s\n'
'EOF'
) % (local_jupyter_path),
'source %(builddir)s/env.sh && npm install ijavascript@5.2.0 -g --prefix %(installdir)s',
# installs ijavascript in $JUPYTER_DATA_DIR/kernels
'source %(builddir)s/env.sh && ijsinstall --install=local',
'source %(builddir)s/env.sh && chmod -R o+x %(installdir)s/share',
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
sanity_check_paths = {
'files': [
'share/jupyter/kernels/javascript/kernel.json',
],
'dirs': [
'lib/node_modules/',
'share/jupyter/kernels/javascript/',
],
}
moduleclass = 'tools'
easyblock = 'Bundle'
name = 'JupyterKernel-Julia'
version = '1.5.2'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-%(pyver)s'
homepage = 'https://github.com/IRkernel/IRkernel'
description = """
Native R kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, local_pysuffix),
('Julia', version),
]
local_common_opts = {
'req_py_majver': '3',
'req_py_minver': '0'
}
exts_defaultclass = 'PythonPackage'
exts_filter = ('python -c "import %(ext_name)s"', '')
exts_default_options = {
'download_dep_fail': True,
'source_urls': [PYPI_SOURCE],
'use_pip': True,
}
exts_list = [
('julia', '0.5.3', dict(list(local_common_opts.items()) + [
('checksums', [('sha256', 'b13207125709fdba069a25c4e54ff366f0bc308807b2aa0f3b66924101799c58')]),
('use_pip', True),
])),
]
local_jupyter_path = 'share/jupyter'
local_julia_depot_path = "%(installdir)s/share/julia/site/" # for Julia packages needed for Jupyter
modextrapaths = {
'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'],
'JUPYTER_PATH': ['share/jupyter'], # add search path for kernelspecs
}
modextravars = {
'JULIA_DEPOT_PATH': local_julia_depot_path,
}
# Ensure that the user-specific $HOME/.local/share/jupyter is always first entry in JUPYTHER_PATH
modluafooter = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
# Create virtual environment to ensure we install in the correct directory !!!
'python3 -m venv %(installdir)s --system-site-packages',
(
'{ cat > %%(builddir)s/env.sh; } << \'EOF\'\n'
'#!/bin/bash\n'
'source %%(installdir)s/bin/activate\n'
'export PYTHONPATH=%%(installdir)s/lib/python%%(pyshortver)s/site-packages:${PYTHONPATH}\n'
''
'export JULIA_DEPOT_PATH=%s\n'
'export JUPYTER_DATA_DIR=%%(installdir)s/%s\n'
'EOF'
) % (local_julia_depot_path, local_jupyter_path),
# installs ijulia in JULIA_DEPOT_PATH and kernel in $JUPYTER_DATA_DIR/kernels
'source %(builddir)s/env.sh && julia -e \'using Pkg; Pkg.add("IJulia"); Pkg.build("IJulia")\'',
# to trigger the precompilation
'source %(builddir)s/env.sh && julia -e \'using IJulia\'',
# adjust permissions of precompiled files
'for i in $(find %s); do chmod +r $i; done' % local_julia_depot_path,
# configure Python<->Julia bridge (of python package julia)
'source %(builddir)s/env.sh && python -c "import julia; julia.install()"',
# Ensure we remove the virtuel environment to avoid wrong search path for python packages
'rm %(installdir)s/pyvenv.cfg',
'rm %(installdir)s/bin/python',
'rm %(installdir)s/bin/python3',
'rm %(installdir)s/bin/activate',
'rm %(installdir)s/bin/activate*',
'rm %(installdir)s/bin/easy_install*',
'rm %(installdir)s/bin/pip*',
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
sanity_check_paths = {
'files': [
'share/jupyter/kernels/julia-%(version_major_minor)s/kernel.json',
],
'dirs': [
'lib/python%(pyshortver)s/site-packages',
'share/jupyter/kernels/julia-%(version_major_minor)s/',
],
}
moduleclass = 'tools'
easyblock = 'Bundle'
name = 'JupyterKernel-Octave'
version = '6.1.0'
local_octavever = '6.1.0'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-%(pyver)s'
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.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
('Octave', local_octavever, '-nompi'), # ensure it is available
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, local_pysuffix),
# no dependency to Octave as it is loaded in kernel.sh
]
local_jupyter_path = 'share/jupyter'
local_kernel_dir = 'octave'
local_kernel_name = 'Octave-%s' % local_octavever
modextrapaths = {
'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages'],
'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 = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
# Create virtual environment to ensure we install in the correct directory !!!
'python3 -m venv %(installdir)s --system-site-packages',
(
'{ cat > %%(builddir)s/env.sh; } << \'EOF\'\n'
'#!/bin/bash\n'
'source %%(installdir)s/bin/activate\n'
'export PYTHONPATH=%%(installdir)s/lib/python%%(pyshortver)s/site-packages:${PYTHONPATH}\n'
'export JUPYTER_DATA_DIR=%%(installdir)s/%s\n'
'EOF'
) % (local_jupyter_path),
# enable use of Octave from production stage Stages/2020
'source %(builddir)s/env.sh && pip3 install ipykernel ',
'rm -rf %(installdir)s/share/jupyter/kernels/', # remove any kernel installed by ipykernel
'source %(builddir)s/env.sh && pip3 install ipyparallel ',
# install Python package octave_kernel
'source %(builddir)s/env.sh && pip3 install octave_kernel==0.32.0 ',
# write kernel.sh
(
'{ cat >> %%(builddir)s/env.sh; } << \'EOF\'\n'
'export KERNEL_DIR=%s\n'
'export KERNEL_NAME=%s\n'
'EOF'
) % (local_kernel_dir, local_kernel_name),
(
'{ source %%(builddir)s/env.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/2020 \n'
'module load GCC/9.3.0 \n'
'\n' \
'module load Python/%%(pyver)s \n'
'module load Jupyter/%s%s \n'
'module load Octave/%s-nompi \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_pysuffix, local_octavever),
'source %(builddir)s/env.sh && chmod +x %(installdir)s/share/jupyter/kernels/${KERNEL_DIR}/kernel.sh',
# write kernel.json
(
'{ source %%(builddir)s/env.sh && '
' 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'
' "octave_kernel", \n'
' "-f", \n'
' "{connection_file}" \n'
' ], \n'
' "display_name": "%s", \n'
' "mimetype": "text/x-octave", \n'
' "language": "python", \n'
' "name": "%s" \n'
'}\n'
'EOF'
) % (local_kernel_dir, local_kernel_dir, local_kernel_name, local_kernel_name),
# ensure correct permissions
'source %(builddir)s/env.sh && chmod -R o+x %(installdir)s/share',
# Ensure we remove the virtuel environment to avoid wrong search path for python packages
'rm %(installdir)s/pyvenv.cfg',
'rm -r %(installdir)s/bin',
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
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'
easyblock = 'Binary'
name = 'JupyterKernel-PyParaView'
version = '5.8.1'
local_paraviewver = '5.8.1'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-%(pyver)s'
homepage = 'https://www.paraview.org'
description = """
Special ParaView kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
sources = [
('logo-128x128.png'),
('logo-32x32.png'),
('logo-64x64.png'),
]
builddependencies = [
('binutils', '2.34'),
# ('ParaView', local_paraviewver, '-EGL' + local_pysuffix, ('gpsmkl', '2020')), # ensure it is available
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, local_pysuffix),
]
local_kernel_dir = 'pyparaview'
local_kernel_name = 'PyParaView-%s' % local_paraviewver
modextrapaths = {
'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"))
"""
postinstallcmds = [
(
'{ cat >> %%(builddir)s/env.sh; } << \'EOF\'\n'
'export KERNEL_DIR=%s\n'
'export KERNEL_NAME=%s\n'
'EOF'
) % (local_kernel_dir, local_kernel_name),
'source %%(builddir)s/env.sh && python -m ipykernel install --name=%s --prefix=%%(installdir)s' % local_kernel_dir,
# write logo image
(
'source %%(builddir)s/env.sh && '
' cp %%(builddir)s/logo-32x32.png %%(installdir)s/share/jupyter/kernels/%s/logo-32x32.png'
) % (local_kernel_dir),
(
'source %%(builddir)s/env.sh && '
' cp %%(builddir)s/logo-64x64.png %%(installdir)s/share/jupyter/kernels/%s/logo-64x64.png'
) % (local_kernel_dir),
(
'source %%(builddir)s/env.sh && '
' cp %%(builddir)s/logo-128x128.png %%(installdir)s/share/jupyter/kernels/%s/logo-128x128.png'
) % (local_kernel_dir),
# write kernel.sh
(
'{ source %%(builddir)s/env.sh && '
' cat > %%(installdir)s/share/jupyter/kernels/%s/kernel.sh; } << \'EOF\'\n'
'#!/bin/bash \n'
'\n'
'# Load required modules \n'
'module purge \n'
'module use $OTHERSTAGES \n'
'module load Stages/2020 \n'
'module load GCC/9.3.0 \n'
'module load ParaStationMPI \n'
'module load Python/%%(pyver)s \n'
'module load Jupyter/%s%s \n'
'\n'
'module load ParaView/%s-EGL%s \n'
'module unload VTK \n'
'\n'
'exec python -m ipykernel $@\n'
'EOF'
) % (local_kernel_dir,
local_jupyterver, local_pysuffix,
local_paraviewver, local_pysuffix),
'source %(builddir)s/env.sh && chmod +x %(installdir)s/share/jupyter/kernels/${KERNEL_DIR}/kernel.sh',
# write kernel.json
(
'{ source %%(builddir)s/env.sh && '
' 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'
'}\n'
'EOF'
) % (local_kernel_dir, local_kernel_dir, local_kernel_name, local_kernel_name),
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
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'
easyblock = 'Bundle'
name = 'JupyterKernel-R'
version = '4.0.2'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-3.8.5'
homepage = 'https://github.com/IRkernel/IRkernel'
description = """
Native R kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Jupyter', local_jupyterver, local_pysuffix),
('R', '4.0.2', '-nompi'),
]
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 = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
# Jupyter Kernel: R - https://github.com/IRkernel/IRkernel
# installs R kernel in $EBROOTJUPYTER/share/jupyter/kernels
'R -e \'IRkernel::installspec(name="ir40", displayname="R 4.0", prefix="%(installdir)s")\'',
# force options(bitmapType='cairo') -> https://github.com/IRkernel/IRkernel/issues/388
(
'sed -i "s#IRkernel::main()#options(bitmapType=\'cairo\') ; IRkernel::main()#g" '
' %(installdir)s/share/jupyter/kernels/ir40/kernel.json'
),
]
sanity_check_paths = {
'files': [
'share/jupyter/kernels/ir40/kernel.json',
],
'dirs': [
'share/jupyter/kernels/ir40/',
],
}
moduleclass = 'tools'
easyblock = 'Bundle'
name = 'JupyterKernel-Ruby'
version = '2.7.1'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-3.8.5'
homepage = 'https://github.com/SciRuby/iruby'
description = """
Native Ruby kernel for Jupyter.
Project Jupyter exists to develop open-source software, open-standards, and services
for interactive computing across dozens of programming languages.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, local_pysuffix),
('Ruby', '2.7.1'),
]
local_jupyter_path = 'share/jupyter'
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 = """
prepend_path("JUPYTER_PATH", pathJoin(os.getenv("HOME"), ".local/share/jupyter"))
"""
postinstallcmds = [
'echo "#!/bin/bash" > %(builddir)s/env.sh',
'echo "export JUPYTER_DATA_DIR=%%(installdir)s/%s" >> %%(builddir)s/env.sh' % local_jupyter_path,
# install Ruby kernel in $JUPYTHER_PATH
'source %(builddir)s/env.sh && iruby register --force ',
# ensure correct permissions
'source %(builddir)s/env.sh && chmod -R o+x %(installdir)s/share',
]
# specify that Bundle easyblock should run a full sanity check, rather than just trying to load the module
# full_sanity_check = True
sanity_check_paths = {
'files': [
'share/jupyter/kernels/ruby/kernel.json',
],
'dirs': [
'share/jupyter/kernels/ruby/',
],
}
moduleclass = 'tools'
easyblock = 'PythonBundle'
name = 'JupyterProxy-XpraHTML5'
version = '0.3.0'
local_jupyterver = '2020.2.5'
versionsuffix = '-' + local_jupyterver
homepage = 'https://xpra.org'
description = """
Jupyter proxy for Xpra HTML5 sessions.
Xpra is an open-source multi-platform persistent remote display server and client
for forwarding applications and desktop screens.
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
builddependencies = [
('binutils', '2.34'),
]
dependencies = [
('Python', '3.8.5'),
('Jupyter', local_jupyterver, '-Python-%(pyver)s'),
]
exts_defaultclass = 'PythonPackage'
exts_default_options = {
'download_dep_fail': True,
'source_urls': [PYPI_SOURCE],
'use_pip': True,
}
local_common_opts = {
'req_py_majver': '3',
'req_py_minver': '0'
}
exts_list = [
('jupyter-xprahtml5-proxy', '0.3.0', dict(list(local_common_opts.items()) + [
('checksums', [('sha256', 'db852682e8e366091e6a3984b60ac3d2e6b3197be2ef074440c11cb09e23b80b')]),
('source_urls', ['https://github.com/FZJ-JSC/jupyter-xprahtml5-proxy/archive/']),
('source_tmpl', 'v0.3.0_devel.tar.gz'),
('patches', ['jupyter_xprahtml5_proxy-launch_xpra.patch']),
('modulename', 'jupyter_xprahtml5_proxy'),
])),
]
sanity_check_paths = {
'files': [],
'dirs': ['lib/python%(pyshortver)s/site-packages'],
}
moduleclass = 'tools'
diff -Naur jupyter-xprahtml5-proxy.orig/jupyter_xprahtml5_proxy/share/launch_xpra.sh jupyter-xprahtml5-proxy/jupyter_xprahtml5_proxy/share/launch_xpra.sh
--- jupyter-xprahtml5-proxy.orig/jupyter_xprahtml5_proxy/share/launch_xpra.sh 2020-11-19 00:13:39.000000000 +0100
+++ jupyter-xprahtml5-proxy/jupyter_xprahtml5_proxy/share/launch_xpra.sh 2020-11-20 18:49:09.557792000 +0100
@@ -5,10 +5,17 @@
# Do it here.
# example
-# module purge > /dev/null
-# module use $OTHERSTAGES > /dev/null
-# module load Stages/2020 > /dev/null
-# module load GCCcore/.9.3.0 > /dev/null
-# module load xpra/4.0.4-Python-3.8.5 > /dev/null
+module purge
+module use $OTHERSTAGES
+module load Stages/2020
+module load GCCcore/.9.3.0
+module load xpra/4.0.4-Python-3.8.5
+module load jsc-xdg-menu/.2020.3
+
+if ! command -v xterm &> /dev/null
+then
+ echo "xterm not found - trying to load the xterm-module"
+ module load xterm
+fi
xpra "$@"
......@@ -36,7 +36,7 @@ builddependencies = [
('archspec', '0.1.0', '-Python-%(pyver)s'),
]
dependencies = [
('CUDA', '11.0', '', True),
('CUDA', '11.0', '', SYSTEM),
('Python', '3.8.5'),
('libpng', '1.6.37'),
('libjpeg-turbo', '2.0.5'),
......
# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild
# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany
# Authors:: Bernd Mohr <b.mohr@fz-juelich.de>
# License:: New BSD
#
# This work is based from experiences from the UNITE project
# http://apps.fz-juelich.de/unite/
##
easyblock = 'Binary'
name = "Vampir"
version = "9.9.0"
local_archsuffix = "-linux-x86_64"
homepage = 'http://www.vampir.eu'
description = """The VAMPIR software tool provides an easy-to-use framework that enables
developers to quickly display and analyze arbitrary program behavior at any level of detail.
The tool suite implements optimized event analysis algorithms and customizable displays that
enable fast and interactive rendering of very complex performance monitoring data.
"""
site_contacts = 'sc@fz-juelich.de'
toolchain = SYSTEM
sources = ['vampir-%s%s-setup.sh' % (version, local_archsuffix)]
install_cmd = './vampir-%(version)s-linux-x86_64-setup.sh --silent --instdir=%(installdir)s'
sanity_check_paths = {
'files': ["bin/vampir", "doc/vampir-manual.pdf"],
'dirs': []
}
modextravars = {
'VAMPIR_LICENSE': '/p/software/jurecadc/licenses/vampir/vampir.license',
}
moduleclass = 'tools'
# This is an easyconfig file for EasyBuild, see https://github.com/hpcugent/easybuild
# Copyright:: Copyright 2013 Juelich Supercomputing Centre, Germany
# Authors:: Bernd Mohr <b.mohr@fz-juelich.de>
# License:: New BSD
#
# This work is based from experiences from the UNITE project
# http://apps.fz-juelich.de/unite/
##
easyblock = 'Binary'
name = "VampirServer"
version = "9.9.0"
homepage = 'http://www.vampir.eu'
description = """The VAMPIR software tool provides an easy-to-use framework that enables
developers to quickly display and analyze arbitrary program behavior at any level of detail.
The tool suite implements optimized event analysis algorithms and customizable displays that
enable fast and interactive rendering of very complex performance monitoring data.
"""
usage = """
To start VampirServer
module load Vampir VampirServer
vampir &
BATCH_OPT="--account=<budget> --partition=<partition>" vampirserver start -n 4 mpi
(note server + port + server_id)
- Use it
Vampir GUI-> open other -> remote file -> server + port
- To stop VampirServer
vampirserver stop <server_id>
"""
site_contacts = 'sc@fz-juelich.de'
toolchain = {'name': 'gpsmpi', 'version': '2020'}
toolchainopts = {"usempi": True}
sources = ['vampirserver-%s-linux-x86_64-setup.sh' % (version)]
install_cmd = ('./vampirserver-%(version)s-linux-x86_64-setup.sh --silent --instdir=%(installdir)s '
'&& %(installdir)s/bin/vampirserver config --silent')
sanity_check_paths = {
'files': ["bin/vampirserver", "doc/vampirserver-manual.pdf"],
'dirs': []
}
# Remove Cray-specific 'ap' launcher,
# use SLURM launcher as MPI launcher and default
postinstallcmds = [
'rm %(installdir)s/etc/server/launcher/ap',
'''sed -i s/'BATCH_OPT=""'/'#BATCH_OPT=""'/g %(installdir)s/etc/server/launcher/custom/slurm''',
'cp %(installdir)s/etc/server/launcher/custom/slurm %(installdir)s/etc/server/launcher/mpi',
]
modextravars = {
'VAMPIR_LICENSE': '/p/software/jurecadc/licenses/vampir/vampir.license',
}
moduleclass = 'perf'
......@@ -16,6 +16,7 @@ toolchainopts = {'opt': True, 'pic': True}
builddependencies = [
('flex', '2.6.4'),
('Bison', '3.6.4'),
('Java', '15', '', SYSTEM),
]
dependencies = [
......@@ -28,7 +29,8 @@ dependencies = [
sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://www.hdfgroup.org/ftp/HDF/releases/HDF%s/src/' % version.split('-')[0]]
configopts = '--with-szlib=$EBROOTSZIP --with-zlib=$EBROOTZLIB --includedir=%(installdir)s/include/%(namelower)s'
configopts = '--with-szlib=$EBROOTSZIP --with-zlib=$EBROOTZLIB --enable-java '
configopts += '--includedir=%(installdir)s/include/%(namelower)s '
sanity_check_paths = {
'files': ['lib/libdf.a', 'lib/libhdf4.settings', 'lib/libmfhdf.a'],
......
......@@ -16,6 +16,7 @@ toolchainopts = {'opt': True, 'pic': True}
builddependencies = [
('flex', '2.6.4'),
('Bison', '3.6.4'),
('Java', '15', '', SYSTEM),
]
dependencies = [
......@@ -28,7 +29,8 @@ dependencies = [
sources = [SOURCELOWER_TAR_GZ]
source_urls = ['http://www.hdfgroup.org/ftp/HDF/releases/HDF%s/src/' % version.split('-')[0]]
configopts = '--with-szlib=$EBROOTSZIP --with-zlib=$EBROOTZLIB --includedir=%(installdir)s/include/%(namelower)s'
configopts = '--with-szlib=$EBROOTSZIP --with-zlib=$EBROOTZLIB --enable-java '
configopts += '--includedir=%(installdir)s/include/%(namelower)s '
sanity_check_paths = {
'files': ['lib/libdf.a', 'lib/libhdf4.settings', 'lib/libmfhdf.a'],
......
......@@ -36,7 +36,7 @@ builddependencies = [
('archspec', '0.1.0', '-Python-%(pyver)s'),
]
dependencies = [
('CUDA', '11.0', '', True),
('CUDA', '11.0', '', SYSTEM),
('Python', '3.8.5'),
('libpng', '1.6.37'),
('libjpeg-turbo', '2.0.5'),
......
......@@ -36,7 +36,7 @@ builddependencies = [
('archspec', '0.1.0', '-Python-%(pyver)s'),
]
dependencies = [
('CUDA', '11.0', '', True),
('CUDA', '11.0', '', SYSTEM),
('Python', '3.8.5'),
('libpng', '1.6.37'),
('libjpeg-turbo', '2.0.5'),
......
# libxc
The default version of `libxc` in the stage `2020` is `4.3.4`. We decided against the newer version `libxc/5.0.0`, as some applications would need to be patched. However, also not every application is working with version `4.3.4`, as the API changed between version 3 and 4. This lead to the fact that we need two different version:
- `libxc/3.0.1`
- `libxc/4.3.4`
Both versions are installed for the following toolchains:
- `GCC/9.3.0`
- `iccifort-2020.2.254-GCC-9.3.0`
## ABINIT
`ABINIT/8.X` is only working with `libxc/3.0.1` due to changes in the API. Starting with `ABINIT/9.X` version 4.3.0 or later is supported.
## Quantum ESPRESSO
While Quantum ESPRESSO 6.6 would work with `libxc/5.0.0`, QE would require a patch. From the Quantum ESPRESSO User Guide (https://www.quantum-espresso.org/Doc/user_guide.pdf):
**Note for version 5.0.0:** the `f03` interfaces are no longer available in `libxc` 5.0.0. They have been reintroduced in the current develop version. Version 5.0.0 is still usable, but, before compiling Quantum ESPRESSO, a string replacement is necessary, namely `‘xcf03’` must berepalced with `‘xcf90’` everywhere in the following files: `funct.f90, xcldalsdadrivers.f90, xcggadrivers.f90, xcmggadrivers.f90, dmxcdrivers.f90` and `dgcxcdrivers.f90` in `Modules` folder and `xctestqelibxc.f90` in `PP/src` folder.
## Note for future Stage 2021
Check if all application can work with the newest version of `libxc`, e.g. 5.0.0. One common version would be desirable.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment