Skip to content
Snippets Groups Projects
Commit d47be93d authored by Jens Henrik Göbbert's avatar Jens Henrik Göbbert
Browse files

update Julia

parent 7aeb5f02
No related branches found
No related tags found
No related merge requests found
easyblock = 'ConfigureMake'
name = 'Julia'
version = '1.6.1'
homepage = 'https://julialang.org/'
description = """Julia was designed from the beginning for high performance.
Julia programs compile to efficient native code for multiple platforms via LLVM
"""
site_contacts = 'j.goebbert@fz-juelich.de'
toolchain = {'name': 'gcccoremkl', 'version': '9.3.0-2020.2.254'}
toolchainopts = {'pic': True}
source_urls = ['https://github.com/JuliaLang/julia/releases/download/v%(version)s/']
sources = ['julia-%(version)s-full.tar.gz']
builddependencies = [
('binutils', '2.34'),
('git', '2.28.0'),
('CMake', '3.18.0'),
]
dependencies = [
('Python', '3.8.5'),
('SciPy-Stack', '2020', '-Python-%(pyver)s'),
]
osdependencies = [('openssl')]
skipsteps = ['configure']
buildopts = " USE_SYSTEM_GMP=1 USE_SYSTEM_CURL=1 USE_INTEL_MKL=1 "
installopts = "prefix=%(installdir)s "
local_julia_depot_path = "%(installdir)s/share/julia/site/"
modextrapaths = {
'PATH': 'bin',
'JULIA_DEPOT_PATH': 'share/julia/site',
}
postinstallcmds = [
# prepare install env
(
'{ cat > %%(builddir)s/env.sh; } << \'EOF\'\n'
'#!/bin/bash\n'
'export JULIA_DEPOT_PATH=%s\n'
'EOF'
) % (local_julia_depot_path),
# installs extra packages
(
'{ cat > %(builddir)s/pkg_add.jl; } << \'EOF\'\n'
'using Pkg; \n'
# General Purpose
'Pkg.add(name="PackageCompiler", version="1.2.5"); \n'
'Pkg.add(name="HTTP", version="0.9.5"); \n'
'Pkg.add(name="Parsers", version="1.1.0"); \n'
'Pkg.add(name="VersionParsing", version="1.2.0"); \n'
'Pkg.add(name="JSON", version="0.21.1"); \n'
'Pkg.add(name="WebIO", version="0.8.15"); \n'
'Pkg.add(name="ProgressMeter", version="1.5.0"); \n'
'Pkg.add(name="Conda", version="1.5.2"); \n'
'Pkg.add(name="PyCall", version="1.92.3"); \n'
'Pkg.add(name="LaTeXStrings", version="1.2.1"); \n'
'Pkg.add(name="DocumentFormat", version="3.2.0"); \n'
# Data Science
'Pkg.add(name="CSV", version="0.8.4"); \n'
'Pkg.add(name="DataFrames", version="0.21.8"); \n'
'Pkg.add(name="Arrow", version="1.4.1"); \n'
'Pkg.add(name="OnlineStats", version="1.5.8"); \n'
'Pkg.add(name="Query", version="1.0.0"); \n'
# Scientific Domains
'Pkg.add(name="GSL", version="1.0.1"); \n'
'Pkg.add(name="DifferentialEquations", version="6.16.0"); \n'
'Pkg.add(name="Distributions", version="0.24.18"); \n'
'Pkg.add(name="Optim", version="1.3.0"); \n'
'Pkg.add(name="IterativeSolvers", version="0.9.0"); \n'
'Pkg.add(name="AbstractFFTs", version="1.0.1"); \n'
'Pkg.add(name="ODE", version="2.13.0"); \n'
'Pkg.add(name="SpecialFunctions", version="1.3.0"); \n'
'Pkg.add(name="JuMP", version="0.21.7"); \n'
# Visualization
'Pkg.add(name="GR", version="0.57.4"); \n'
'Pkg.add(name="PlotlyJS", version="0.14.1"); \n'
'Pkg.add(name="PyPlot", version="2.9.0"); \n'
'Pkg.add(name="Plots", version="1.12.0"); \n'
'Pkg.add(name="UnicodePlots", version="1.3.0"); \n'
'Pkg.add(name="StatsPlots", version="0.14.19"); \n'
# MachineLearning
'Pkg.add(name="MLJ", version="0.16.2"); \n'
'Pkg.add(name="Flux", version="0.12.2"); \n'
'Pkg.add(name="Knet", version="1.4.6"); \n'
'Pkg.add(name="MLDatasets", version="0.5.6"); \n'
'EOF'
),
'source %(builddir)s/env.sh && %(installdir)s/bin/julia %(builddir)s/pkg_add.jl',
# trigger precompilation
(
'{ cat > %(builddir)s/precomp.jl; } << \'EOF\'\n'
# General Purpose
'using PackageCompiler; \n'
'using HTTP; \n'
'using Parsers; \n'
'using VersionParsing; \n'
'using JSON; \n'
'using WebIO; \n'
'using ProgressMeter; \n'
'using Conda; \n'
'using PyCall; \n'
'using LaTeXStrings; \n'
'using DocumentFormat; \n'
# Data Science
'using CSV; \n'
'using DataFrames; \n'
'using Arrow; \n'
'using OnlineStats; \n'
'using Query; \n'
# Scientific Domains
'using GSL; \n'
'using DifferentialEquations; \n'
'using Distributions; \n'
'using Optim; \n'
'using IterativeSolvers; \n'
'using AbstractFFTs; \n'
'using ODE; \n'
'using SpecialFunctions; \n'
'using JuMP; \n'
# Visualization
'using GR; \n'
'using PlotlyJS; \n'
'using PyPlot; \n'
'using Plots; \n'
'using UnicodePlots; \n'
'using StatsPlots; \n'
# MachineLearning
'using MLJ; \n'
'using Flux; \n'
'using Knet; \n'
'using MLDatasets; \n'
'EOF'
),
'source %(builddir)s/env.sh && %(installdir)s/bin/julia %(builddir)s/precomp.jl',
# adjust permissions of precompiled files
'for i in $(find %s); do chmod +r $i; done' % local_julia_depot_path,
]
sanity_check_paths = {
'files': ['bin/julia', 'include/julia/julia.h', 'lib/libjulia.so'],
'dirs': ['bin', 'etc', 'include', 'lib', 'share']
}
moduleclass = 'lang'
easyblock = 'Bundle'
name = 'JupyterKernel-Julia'
version = '1.6.1'
local_jupyterver = '2020.2.6'
versionsuffix = '-' + local_jupyterver
local_pysuffix = '-Python-%(pyver)s'
homepage = 'https://github.com/JuliaLang/IJulia.jl'
description = """
Native Julia 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'),
('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.6', dict(list(local_common_opts.items()) + [
('checksums', [('sha256', '378d0377f75bb0e3bfc4cce19a56d3bf5a9a7be38e370e3a7cf3359bf4cd0378')]),
('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
'JULIA_DEPOT_PATH': ['share/julia/site'],
}
# 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:${JULIA_DEPOT_PATH}\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
(
'{ cat > %(builddir)s/pkg_add.jl; } << \'EOF\'\n'
'using Pkg; \n'
'Pkg.add(name="ZMQ", version="1.2.1"); \n'
'Pkg.add(name="IJulia", version="1.23.2"); \n'
'Pkg.add(name="Interact", version="0.10.3"); \n'
'Pkg.add(name="LanguageServer", version="3.2.0"); \n'
'Pkg.build("IJulia"); \n'
'EOF'
),
'source %(builddir)s/env.sh && julia %(builddir)s/pkg_add.jl',
# to trigger the precompilation
(
'{ cat > %(builddir)s/precomp.jl; } << \'EOF\'\n'
'using ZMQ; \n'
'using IJulia; \n'
'using Interact; \n'
'using LanguageServer; \n'
'EOF'
),
'source %(builddir)s/env.sh && julia %(builddir)s/precomp.jl',
# 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'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment