Auto-loading the Julia module
On Noctua, the julia
executable is only available after loading a Julia module (see TODO). To use the Julia VS Code extension within a VS Code SSH remote session you must make sure that a Julia module is automatically loaded when the Julia Language Server starts (i.e. when opening or creating a Julia file) or when you open the Julia REPL (i.e. Julia: Start REPL
). This can be done by pointing the extension to a wrapper script which loads the module and then starts julia.
Specifically, create a file julia_wrapper.sh
with the following content
#!/bin/bash # ------------------------------------------------------------ export MODULEPATH=/etc/modulefiles:/usr/share/modulefiles || : source /usr/share/lmod/lmod/init/profile if [ -f "/opt/software/pc2/lmod/modules/DefaultModules.lua" ];then export MODULEPATH="$MODULEPATH:/opt/software/pc2/lmod/modules" export LMOD_SYSTEM_DEFAULT_MODULES="DefaultModules" else if [ -f "/usr/share/modulefiles/StdEnv.lua" ];then export LMOD_SYSTEM_DEFAULT_MODULES="StdEnv" fi fi module --initial_load restore # ------------------------------------------------------------ ml lang ml JuliaHPC exec julia "${@}"
and make the “Executable Path” setting of the Julia extension (julia.executablePath
) point to this file.