Use Julia's language without an internet connection (mirror?)

Problem: I would like to make julia available to our developers on our corporate network, which does not have access to the Internet at all (without a proxy), due to confidential data.

As far as I understand, julia is for using github. For example, julia> Pkg.init () is trying to access: git: //github.com/JuliaLang/METADATA.jl

Example: I solved this problem for R by creating a local CRAN repository (rsync) and installing a local web server. I also solved this problem for python in the same way by creating a local PyPi repository (bandersnatch) + web server.

Question: Is there a way to create a local repository for metadata and packages for julia?

Thanks in advance. Roman

+6
source share
2 answers

Yes, one of the benefits of using Julia's package manager is that you should be able to unlock METADATA and place it wherever you want (and keep a branch where you can really check for new packages before allowing your customers to update). You can be one of the first people to actually create such a system, so expect that you will need to send some problems (or, better yet, send requests) so that everything works smoothly.

See the additional arguments to Pkg.init () for the URL of the METADATA relay.

If you need a simpler management solution, I would also think about setting up two levels, in which you install packages on one system (connected to the Internet), and then copy the resulting ~/.julia to a limited system. If the packages you use have binary dependencies, you may run into problems if you do not have similar systems on both sides, or if some of the dependencies are installed globally, but Pkg.build("Pkgname") may be useful.

+8
source

This is how I solved it (for now) using the second ivarne sentence. I use two-level configuration, two networks connected to the Internet (office network), one network with air traffic (development network).

System Information: openSuSE-13.1 (both networks), julia-0.3.5 (both networks)

Level 1 (office network)

  • julia is installed on the NFS share, /sharename/local/julia .
  • soft link /sharename/local/bin/julia to /sharename/local/julia/bin/julia
  • added /sharename/local/bin/ to $PATH using script in /etc/profile.d/scriptname.sh
  • created /etc/gitconfig for all office network machines: [url "https://"] insteadOf = git:// (to solve problems with a proxy server with github)
  • Now every user on the office network can just run # julia
  • Pkg.add("PackageName") then used to install various packages.

Two networks are periodically connected (with specific ssh security measures, firewall, routing) for automatic data exchange for a short period of time.

Second level (development network)

  • julia is installed on an NFS share equal to the level of the first.
  • When the networks are connected, I use a shell script with rsync -avz --delete to synchronize the second level .julia directory for the second level for each user.

Conclusion (for now): It seems to work quite well. According to ivarne , there are problems if the package is installed and something more than just copying files (compiled?) At the first level, the package will not work at the second level. But this can be solved using Pkg.build("Pkgname") .

+2
source

Source: https://habr.com/ru/post/980983/


All Articles