I’m so frustrated.
We’ve implemented our whole production environment in Julia and working really well, but can’t get v1.0 packages working.
We are behind a firewall, so can’t add/download packages, so I currently have the following:
v5.2
compile and build packages and dependencies on an external server
copy compiled packages to production server
manually change dep.jl files and all compile paths in packages
Change the relevant Julia run-time path variables for new directory
– works perfectly
How on earth do we do this in v1.x.
The documentation doesn’t seem to covert this, or is unclear
Changing DEPOT_PATH doesn’t really help
Failed Scenario:
I’ve compiled GLM on another server and copied ~/.julia/* to production directory
changed DEPOT_PATH to include new path
I’d expect this to work… or at least be intuitive on where to make changes
If I look in the copied path for GLM, I find it in:
./packages/GLM
./registries/General/G/GLM
./compiled/v1.0/GLM
and if I try to use GLM, I get:
ERROR: IOError: stat: permission denied (EACCES)
Stacktrace:
[1] stat(::String) at ./stat.jl:68
[2] samefile at ./stat.jl:311 [inlined]
[3] macro expansion at ./logging.jl:305 [inlined]
[4] macro expansion at ./logging.jl:318 [inlined]
[5] stale_cachefile(::String, ::String) at ./loading.jl:1330
[6] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:693
[7] _require(::Base.PkgId) at ./loading.jl:937
[8] require(::Base.PkgId) at ./loading.jl:858
[9] macro expansion at ./logging.jl:309 [inlined]
[10] require(::Module, ::Symbol) at ./loading.jl:840
… I’m presuming that somehow Julia is looking in a wrong path, but where?
I thought that maybe the underlying optimizer is looking for a C library, but the message doesn’t seem to reflect that…
The same is true for DataFrames, which, as far as I know, wouldn’t use any dependent C libraries
What you do should work but something seems to be going wrong when the already precompiled files in .julia/compiled are getting loaded. Like @00vareladavid said, please check that the permission of the files are correct. To check if the DEPOT_PATH is correct, you can start julia in the production environment and do a import Pkg; Pkg.status(). GLM should be listed and it should not warn about being uninstalled if the DEPOT_PATH is set correctly.
Perhaps you can try not copying over the precompilation file (the files in compiled) and let them be regenerated on the production server and see what happens in that case.
Thanks — permissions were fine — seemed to be the already compiled/cached packages from the previous system — once files under /…/compiled/v1.0/* were deleted, worked like a charm
using DataFrames
ERROR: ArgumentError: Package DataFrames not found in current path:
- Run `import Pkg; Pkg.add("DataFrames")` to install the DataFrames package.
Both my LOAD_PATH and DEPOT_PATH contains the new_.julia_path. But I copied the folders from Windows to Linux.
Edit
I realised that the issue was that I copied v1 library to v1.1. So I had to just copy the /environments/v1.0 to /environments/v1.1 and it worked!!!