-
Notifications
You must be signed in to change notification settings - Fork 703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Julia: user depot not accessible with Pkg.add #17455
Comments
So I tested several configurations for this issue and there is no setup that allows users to easily install their own Julia packages on top of our installations. With easybuilders/easybuild-easyblocks#2935 we get back the user depot Regardless of the contents of $ julia -E 'Base.DEPOT_PATH'
["~/.julia",
"~/easybuild/install/skylake/software/Julia/1.8.5-linux-x86_64/share/julia",
"~/easybuild/install/skylake/software/IJulia/1.24.0-Julia-1.8.5"]
$julia -E 'Base.load_path()'
["~/easybuild/install/skylake/software/IJulia/1.24.0-Julia-1.8.5/environments/v1.8/Project.toml",
"~/easybuild/install/skylake/software/Julia/1.8.5-linux-x86_64/share/julia/stdlib/v1.8"]
$ julia -E 'Base.active_project()'
"~/easybuild/install/skylake/software/IJulia/1.24.0-Julia-1.8.5/environments/v1.8/Project.toml" Hence, executing Therefore, users wanting to add their own packages on top of our modules have to create their own environments. This is similar in approach to what is done with virtual environments in Python, where users create a $ base_project=$(julia -E 'Base.active_project()')
$ cp -r "$(dirname ${base_project:1:-1})" myNewEnv
$ chmod -R +w myNewEnv
$ julia -E 'using Pkg; Pkg.activate("myNewEnv"); Pkg.status()'
Activating project at `/vscmnt/brussel_pixiu_data/_data_brussel/vo/000/bvo00005/vsc10122/tests/julia/myNewEnv`
Status `/vscmnt/brussel_pixiu_data/_data_brussel/vo/000/bvo00005/vsc10122/tests/julia/myNewEnv/Project.toml`
[...]
[7073ff75] IJulia v1.24.0 `~/easybuild/install/skylake/software/IJulia/1.24.0-Julia-1.8.5/packages/IJulia`
[...] Once the custom user environment is active, installations of additional packages will take place inside the environment folder while those packages provided by the modules will be also available and taken into account. |
Regarding the use of Whenever we append new installations of
If we would manually prepend new installations to
However, effectively, the environment works in the same way in both cases. The active project switches to that of the last JuliaPackage loaded. So users still need to create their own environments to add their own packages on top of our modules. As explained in previous comment. |
Fixed by easybuilders/easybuild-easyblocks#2935 and #17976. See explanation in this issue for a solution to allow end-users to add their packages on top of the installations from EasyBuild: #17455 (comment) |
The Julia easyconfigs and JuliaPackages follow the usual approach of prepending installation paths to the environment. In this case, new modules prepend their installation path to
JULIA_DEPOT_PATH
.However, this breaks the capability of end-users to install new packages with
Pkg.add()
in Julia. This tool only uses the top path inDEPOT_PATH
as destination of new installations. This seems to be by design as described in the Pkg documentationSo we would have to append paths to
JULIA_DEPOT_PATH
to not breakPkg
. The issue is that this approach allows user installs to overwrite what is loaded with modules from EasyBuild (not desirable).An alternative approach might be to use JULIA_LOAD_PATH in our easyconfigs to control locations with available installations and only set
JULIA_DEPOT_PATH
to the user's depot.The text was updated successfully, but these errors were encountered: