-
Notifications
You must be signed in to change notification settings - Fork 163
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
Create install_julia.sh #157
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Latest Julia version (this needs to be manually updated, periodically) | ||
JULIA_LATEST=1.6-latest | ||
|
||
JULIA_VERSION=${1:-${JULIA_VERSION:-latest}} | ||
|
||
if [ "$JULIA_VERSION" = "latest" ]; then | ||
JULIA_VERSION=$JULIA_LATEST | ||
fi | ||
JULIA_MAJOR_VERSION=${JULIA_VERSION:0:3} | ||
|
||
# Download and extract Julia. We'll use a common /opt/julia/ location regardless of version | ||
wget https://julialang-s3.julialang.org/bin/linux/x64/$JULIA_MAJOR_VERSION/julia-$JULIA_VERSION-linux-x86_64.tar.gz -O /opt/julia.tar.gz | ||
mkdir /opt/julia | ||
tar zxvf /opt/julia.tar.gz -C /opt/julia --strip-components 1 | ||
rm -rf /opt/julia.tar.gz | ||
|
||
# Add to path | ||
echo 'export PATH="/opt/julia/bin:$PATH"' >> .bashrc | ||
source .bashrc | ||
|
||
# Add RCall package for interoperability from Julia | ||
julia -e 'using Pkg; Pkg.add("RCall")' | ||
|
||
# Add R packages for interoperability the other way around | ||
#Rscript -e 'install.packages(c("JuliaCall", "JuliaConnectoR")); JuliaCall::julia_setup()' | ||
install2.r --error --skipinstalled JuliaCall JuliaConnectoR | ||
Rscript -e 'JuliaCall::julia_setup()' | ||
|
||
# Make sure we start in bash | ||
CMD ["bash"] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking other scripts, I think there is room for modification in the way the PATH is set.
rocker-versioned2/scripts/install_pyenv.sh
Lines 22 to 24 in 3b41d37
How to set environment variables is currently being discussed in #151 (comment), but the above description seems to be the standard at this time.
I am not an expert in these scripts or PATH settings, so if this comment is incorrect, please feel free to ignore it.