Skip to content
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

install_julia script #128

Closed
grantmcdermott opened this issue Feb 24, 2021 · 8 comments · Fixed by #269
Closed

install_julia script #128

grantmcdermott opened this issue Feb 24, 2021 · 8 comments · Fixed by #269

Comments

@grantmcdermott
Copy link
Contributor

Given the growing integration of R and Julia, an install_julia.sh script could be a welcome addition to the stack.

I have an example here, which rather lazily leverages @abelsiqueira handy JILL script. (OTOH I've also seen Julia devs recommend this as a preferred option for installing Julia on Linux 🤷)

Of course, one could always take the main ingredients out of Abel's script and include them directly in a dedicated install_julia.sh file. Speaking of which...

While the Julia-R interoperability generally works great (esp. from the Julia side), there is a known issue associated with recent Linux builds. Adding the following to my Dockerfile solved the problem for me:

## Extra steps needed for RCall library (Julia)
ENV LD_LIBRARY_PATH="/usr/local/lib/R/lib"
RUN cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /opt/julias/julia-1.5.0/lib/julia

Thanks for considering!

@cboettig
Copy link
Member

Nice, I'd definitely be supportive of an install_julia.sh script (especially given the necessary workaround for Ubuntu distributions newer than 19.04 -- sad to see that still hasn't been closed).

I suppose the binary Julia is the way to go here instead of just installing from the ubuntu repos (looks like focal is on Julia 1.4 still) or building from source? It's always nice when we can crib install_*.sh scripts from whatever recipe is most popular elsewhere since it makes it more of a standard experience, so I'm fine with the JILL script and the monkey-patch libstdc++ if that's standard operating procedure :-)

@eddelbuettel
Copy link
Member

@grantmcdermott and I were DMing about this a little too -- is there no PPA with decent up-to-date binaries? For the little I do with Julia the default has been fine so I haven't really looked...

@grantmcdermott
Copy link
Contributor Author

grantmcdermott commented Feb 24, 2021

@eddelbuettel No PPA's as far as I am aware (or that my quick searching turned up).

@cboettig Cool! Let me know if I can help. I have this in my aforementioned example, but one other thing I'd probably include is a line adding the General Pkg registry. May as well pull in the RCall package while you're at it.

RUN julia -e 'using Pkg; Pkg.Registry.add("General"); Pkg.add("RCall")'

@eddelbuettel
Copy link
Member

As we're system building here I would suggest to replace

ENV LD_LIBRARY_PATH="/usr/local/lib/R/lib"

with an entry (same assigned value, file needs to end in \.conf) in the directory /etc/ld.so.conf.d/

The copying of the C++ library is also making me cough a little. Appears to be a standard package on my box:

edd@rob:~$ dpkg -S /usr/lib/x86_64-linux-gnu/libstdc++.so.6 
libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6
edd@rob:~$ apt-cache policy libstdc++6
libstdc++6:
  Installed: 10.2.0-13ubuntu1
  Candidate: 10.2.0-13ubuntu1
  Version table:
 *** 10.2.0-13ubuntu1 500
        500 http://us.archive.ubuntu.com/ubuntu groovy/main amd64 Packages
        100 /var/lib/dpkg/status
edd@rob:~$ 

@cboettig
Copy link
Member

Thanks. @grantmcdermott want to put a PR together for an install_julia.sh?

@cboettig
Copy link
Member

And what timing! JuliaLang/julia#34276 sounds like the julia 1.6 release candidate has finally upgraded it's libraries so copying over the local libstdc++ may not longer be necessary soon...

@grantmcdermott
Copy link
Contributor Author

And what timing! JuliaLang/julia#34276 sounds like the julia 1.6 release candidate has finally upgraded it's libraries so copying over the local libstdc++ may not longer be necessary soon...

Excellent! I'd like to think our conversation here obviously made all the difference...

I believe Julia 1.6 is close to official/stable release, so I'll hold off on the PR until then. (Unless you'd prefer to have something up and running in the meantime?)

@cboettig
Copy link
Member

sounds good, happy to wait for the release. I don't use julia much at the moment and haven't played around with the R interface, but I think the use case is still compelling, and we're very much a community project here driven by sharing collective use cases. So thanks for taking this one on!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants