Giter VIP home page Giter VIP logo

jill's Introduction

jill - Julia Installer 4 Linux - Light

GitHub Workflow Status DOI GitHub release (latest by date)

Julia 1.10.2 Julia 1.6.7 Julia 1.10.0-rc3

Julia light installer for Linux.


On Linux, the best way to install Julia is to use the Generic Linux Binaries. And while all Linux users love manually downloading, unpacking, and linking their software, this script does it for you.

Quick version - Install latest stable linux

Simply run

sudo bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/main/jill.sh)"

Sudo is optional. If you prefer to not use it, make sure to add $HOME/.local/bin to your PATH.

More options - Download jill.sh

Either download the jill.sh script, e.g.

wget https://raw.githubusercontent.com/abelsiqueira/jill/main/jill.sh

or

curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/main/jill.sh > jill.sh

or clone the full repo (for instance, if you had SSL issues as in #32):

git clone https://github.com/abelsiqueira/jill

You can use the script via bash jill.sh or make it executable using chmod a+x jill.sh. We'll use the former version here.

Usage:

bash jill.sh [options]

If no options are given, this will install the latest stable Julia. The .tar.gz and unpacked folder will be kept on the environment variable JULIA_DOWNLOAD, and the julia executable will be linked in JULIA_INSTALL.

By default, we use

  • JULIA_DOWNLOAD=/opt/julias and JULIA_INSTALL=/usr/local/bin if you have root permission (e.g. called with sudo).
  • JULIA_DOWNLOAD=$HOME/packages/julias and JULIA_INSTALL=$HOME/.local/bin otherwise.

The following options are avaiable:

  • -h, --help: Show a help.
  • --lts: Install the Long Term Support version (Currently 1.6.7).
  • --rc: Install the latest release candidate (uses jq to query the versions from julialang.org).
  • -u M.m, --upgrade M.m: Copy environment from M.m version (e.g. -u 1.6)
  • -v VER, --version VER: Install julia version VER. Valid examples: 1.5.4, 1.5-latest, 1.5.0-rc1.
  • -y, --yes, --no-confirm: Skip confirmation.

LICENSE

This script is licensed under the GNU GPLv3 (see LICENSE.md). This dosn't affect your Julia usage at all.

jill's People

Contributors

abelsiqueira avatar alemelis avatar amontoison avatar blegat avatar fakuivan avatar johnnychen94 avatar lilithhafner avatar overcookedpanda avatar sdotd avatar storopoli avatar vnikoofard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jill's Issues

Update for Julia v1.3

Just tested it to install Julia v1.3 and it worked. Maybe the "Last tested version" on the README can be updated ?

Allow install of release candidates

It doesn't seem to be possible to use jill to download the 1.6 release candidate:

➜  ~/.local/bin jill download 1.6
query the latest 1.6 version, it may take seconds...
version 1.6 is not available, use latest stable release.

Would be great if this were supported. Also, since we already have jill install stable and jill install latest we could also add something like jill install beta or jill install rc to install the latest rc candidate.

Update: Note that an explicit jill download 1.6.0-rc1 works. So it seems that jill is only checking for stable 1.6.x versions.

MacOS support

@johnnychen94 after I dropped MacOS support on #39 you offered to help fix what was needed for the update.

@sdotd got in touch by e-mail to say he is available to help support MacOS.

With both of your help, I think we can bring back MacOS support to Jill.sh.

I have created a branch https://github.com/abelsiqueira/jill/tree/macos to update the support and check what is breaking. Here is the broken Github Action: https://github.com/abelsiqueira/jill/actions/runs/621647254

Thanks for the availability, I hope we can make this work.

Issue with `vjul` directory

Hi,

I'm trying to update my Julia 1.7.3 installation using the following command
sudo ./jill.sh -u julia-1.7.3 But I get the following error
cp: cannot stat '/root/.julia/environments/vjul': No such file or directory
I also had installed the version 1.7.3 using jill.

Any help is appreciated.

User sudo with -u option makes the Project and Manifest files owned by root

Ah, just one more comment. After upgrading to 1.8 and copying the environments using jill, to update the package using Pkg it throws an error
ERROR: SystemError: opening file "/home/vahid/.julia/environments/v1.8/Manifest.toml": Permission denied
The workaround is run the Julia using sudo.

Originally posted by @vnikoofard in #71 (comment)

To reproduce:

sudo bash jill.sh --lts
# Install a package
sudo bash jill.sh -u 1.6
ls ~/.julia/environments/v1.8 -l

bring back JULIA_VERSION=x and JULIA_VERSION=x.y

#11 allows downloading specific Julia versions, while it unexpectedly introduced a breaking change that usages like the following don't work anymore.

JULIA_VERSION=1 bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"

Unfortunately, my bash knowledge stops me from fixing this. 😂

Randomly fails on OSX Travis

An example:

Resolving julialang.org (julialang.org)... 151.101.2.49, 151.101.66.49, 151.101.130.49, ...
Connecting to julialang.org (julialang.org)|151.101.2.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26456 (26K) [text/html]
Saving to: ‘page.html’
page.html           100%[===================>]  25.84K  --.-KB/s    in 0.003s  
2019-10-13 00:44:44 (7.90 MB/s) - ‘page.html’ saved [26456/26456]
cp: julia-1.2.0/Julia-1.2.app: No such file or directory
umount: julia-1.2.0: not currently mounted

Future of Jill: Feedback session

Hi all,

As you may know, juliaup "will soon be announced as the official installer", so it is a good time to question the future of alternative installers - in particular, the one I created: Jill.
With that in mind, I would like to hear some feedback from users and contributors.

Here are some example questions, but feel free to reply with other opinions.

  • Do you intend to keep using Jill?
  • If yes, why? What are your reasons for using Jill?
  • Does juliaup solves the problem that led you to use jill?
  • how do you download Jill? curl, clone, manually?
  • how do you use Jill? Using sudo? Some config or none?
  • how often do you update your Julia distribution - i.e., how ofter do you run Jill.
  • how often do you update your Jill?
  • Do you want more advanced features for jill? Such as #23 and #62?
  • Would you contribute to Jill doing small issues? Such as updating the currently supported Julia version.
  • Would you help maintain Jill?
  • Would you fork Jill if it died?

Also, it appears Jill just passed 0xff stars. I really appreciate that you found this package useful - or at least interesting. Thank you very much 😀

x-post:

curl: (60) SSL certificate problem

Excuse me,When installing according to the operation steps of README, the error "curl: (60) SSL certificate problem: self signed certificate" is reported. When SSL is turned off with -k, the installation cannot be performed normally, and no reasonable solution can be found through goolge query. Please advise.

Wrong architecture

If Linux language is not english, lscpu will not give the right Architecture. The jill is downloading the 32bit version of julia.

jill/jill.sh

Line 72 in 9a1faeb

arch="$(lscpu | grep Architecture | cut -d':' -f2 | tr -d '[:space:]')"

Enhancement: support optional mirror

To boost the downloading (approximately from 10Kb/s to 5Mb/s), I made a modification that downloads from USTC mirror (in China)

minor=$(echo $version | cut -d. -f1-2)
+ version=$(echo $version | cut -d 'v' -f2)
- url=https://julialang-s3.julialang.org/bin/$platform/x$bit/$minor/julia-$version-$suffix
+ url=http://mirrors.ustc.edu.cn/julia/releases/v$minor/julia-$version-$suffix
echo $url

https://github.com/johnnychen94/jill/blob/bee99595fdd5aec238a84b121109f921c247ece8/jill.sh#L110-L121

The naming rule is slightly different from the official site, Is there any good strategy to template this URL in bash? If so then we could add a mirror option to the current script.

Julia latest already downloaded disallows updating

After installing 1.5, julia-1.5-latest.tar.gz was left in the folder blocks the download of 1.5.1.
Same for the folder julia-1.5-latest. Probably renaming the folder and tar to julia-1.5.0 at the end of the script is the best way to handle this.

Add documentation about `sudo -E` for preserving HOME information

I think I got it now. Try sudo -E ./jill.sh -u 1.7.

The explanation is from https://unix.stackexchange.com/questions/684395/tilde-expansion-vs-variables-in-bash.

It looks like sudo does not preserve your $HOME information, so it uses the roots $HOME, which is /root.
If you run with -E, it will use your $HOME, which is /home/vahid.

To test this, create a tmp.sh file with the contents echo ~, and run

bash tmp.sh
sudo bash tmp.sh
sudo -E bash tmp.sh

In my case it returned

/home/abel
/root
/home/abel

Originally posted by @abelsiqueira in #71 (comment)

Installing latest twice (or more) moves folders to wrong places

Installing the latest version will run

mv julia-1.5-latest julia-1.5.3

The first time is fine. The second time will create julia-1.5.3/julia-1.5-latest, which is not desired behaviour.
If run again, the mv command will error.

The simple solution is to create a check for the version and warn the user.

HTTP request sent, awaiting response... 404 Not Found

I'm on a headless Raspbian on a Raspberry Pi (4), and:

$ bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"
JILL - Julia Installer 4 Linux (and MacOS) - Light
Copyright (C) 2017 Abel Soares Siqueira <[email protected]>
Distributed under terms of the GPLv3 license.
This script will:

  - Download latest stable Julia
  - Create a link for julia
  - Create a link for julia-VER

Download folder: /home/pi/packages/julias
Link folder: /home/pi/.local/bin

Download folder will be created if required
Do you accept these terms? (Y/N) y
--2020-02-20 07:55:37--  https://julialang.org/downloads/
Resolving julialang.org (julialang.org)... 151.101.130.49, 151.101.2.49, 151.101.194.49, ...
Connecting to julialang.org (julialang.org)|151.101.130.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24270 (24K) [text/html]
Saving to: 'page.html'

page.html                                            100%[=====================================================================================================================>]  23.70K  --.-KB/s    in 0.009s  

2020-02-20 07:55:37 (2.63 MB/s) - 'page.html' saved [24270/24270]

Downloading Julia version 1.3.1
--2020-02-20 07:55:37--  https://julialang-s3.julialang.org/bin/linux/x32/1.3/julia-1.3.1-linux-armv7l.tar.gz
Resolving julialang-s3.julialang.org (julialang-s3.julialang.org)... 151.101.86.49, 2a04:4e42:14::561
Connecting to julialang-s3.julialang.org (julialang-s3.julialang.org)|151.101.86.49|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2020-02-20 07:55:37 ERROR 404: Not Found.


gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now

I should mention that manually downloading (wget [link]), unpacking (tar -zxvf [julia.tar.gz]), and testing (julia) worked just fine.

Create dry-run

Create an option --dry-run that doesn't perform any operations, only shows what it would do.

jill does not install julia-1.90

Previously I used jill under macOS to install julia-1.8.5. Today neither "jill.sh" nor "jill.sh -v 1.90" installs the latest julia, namely, 1.90. The first does nothing; the second, while giving the message "Try to download julia version '1.90", gives error "cp: julia-1.9/Julia-1.9.app: No such file or directory".

What's wrong?

`get_latest_version` fails

The script gives the following error:

$ bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"
JILL - Julia Installer 4 Linux (and MacOS) - Light
Copyright (C) 2017 Abel Soares Siqueira <[email protected]>
Distributed under terms of the GPLv3 license.
This script will:

  - Download latest stable Julia
  - Create a link for julia
  - Create a link for julia-VER

Download folder: /home/blegat/packages/julias
Link folder: /home/blegat/.local/bin

Do you accept these terms? (Y/N) y
--2020-03-30 16:21:09--  https://julialang.org/downloads/
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving julialang.org (julialang.org)... 151.101.66.49, 151.101.130.49, 151.101.2.49, ...
Connecting to julialang.org (julialang.org)|151.101.66.49|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 15203 (15K) [text/html]
Saving to: ‘page.html’

page.html                                       100%[=====================================================================================================>]  14.85K  --.-KB/s    in 0.02s   

2020-03-30 16:21:10 (843 KB/s) - ‘page.html’ saved [15203/15203]

Downloading Julia version 1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.4.0
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
1.0.5
2.6.18
bash: [: too many arguments
already downloaded
bash: [: too many arguments
ln: target '/home/blegat/.local/bin/julia': No such file or directory
ln: target '/home/blegat/.local/bin/julia-1.4': No such file or directory
ln: target '2.6.18': No such file or directory

but works fine with

$ JULIA_VERSION=1.4.0 bash -ci "$(curl -fsSL https://raw.githubusercontent.com/abelsiqueira/jill/master/jill.sh)"

The line

jill/jill.sh

Line 107 in 90f8394

grep "Current stable release:" page.html | grep "[0-9]*\.[0-9]*\.[0-9]*" -o

seems to rely on assumptions on the webpage of the JuliaLang download page that no longer hold.

Question: Why is the user download directory not hidden?

From the readme, without sudo and by default JULIA_DOWNLOAD=$HOME/packages/julias. Some folks prefer that programs not edit their home directories except for $HOME/.whatever, so I'm curious why you chose this particular download location instead of, say, $HOME/.local/julias. I'm also curious if you happen to know of some sort of documented standard for where to install user software without root on linux.

Should JuliaLang officially support Jill?

Expanding the discussion on JuliaLang/www.julialang.org#928

It was brought up whether jill should be included in a more official capacity on the Julia website, and I think the discussion can happen here.

Background

My motivation for creating jill was "I want to wget the latest version but I forgot the url", and since I was gonna tar and ln -s that downloaded version, I figured it might as well be a bash script. Naturally, I put it online for others to use, and I thought it would be cool to have it installable like brew (One line C-c C-v). Instead, I decided it was simpler to have it only runnable by C-c C-v.

jill is actually my second attempt at a Julia version manager: https://github.com/abelsiqueira/julia-mngr. julia-mngr was too complicated, so my second attempt was really focused on "just get the latest".

Official support

I am not sure if jill should be the recommended installation procedure for Linux, as it is more complicated than the three lines required to make Julia work, but it is moving along nicely to become a versions manager. I am receiving amazing contributions, and I run it every time a new Julia release is made. I also update the badge Julia 1.5.0 everytime a new release is made, so it is kept "healthy".

The concern that jill is not part of the JuliaLang repo was already raised, and I agree. If the Julia team decides it's best, I have no problem moving it. I also plan to keep maintaining it for the foreseeable future, as I am now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.