Skip to content

Preparing for your ResBaz 2023 Julia workshop

Anthony Blaom, PhD edited this page May 14, 2023 · 1 revision

Installation of workshop resources

It takes some time to download and compile all the code we will need for these workshops. To reduce delays during the workshop, please follow these instructions beforehand. (This will force precompilation of some of the specific libraries we will be using.)

Step 1

Install a correct version of the Julia compiler.

Step 2

Make sure you have a reliable internet connection and, in a new Julia session, type the following at the julia> prompt:

using Pkg
Pkg.activate(temp=true)
Pkg.develop(url="https://github.com/ablaom/HelloJulia.jl/#dev")
Pkg.activate(joinpath(Pkg.devdir(), "HelloJulia"))
Pkg.instantiate()
Pkg.build("Conda")
Pkg.build("IJulia")

using HelloJulia, MLJ, CairoMakie, Pluto, BetaML, DataFrames  # to test the installation

You can either type these line-by-line, pressing return (or enter) after each line, or copy and paste the block, ensuring you press return one last time after pasting, to ensure the last line is also executed.

This takes about 15 minutes on a 2018 MacBook Pro. You're done when the julia> prompt returns. You should see something approximately like this:

Step 3

Quit Julia with control-D (press control and D on your keyboard simultaneously) or by entering exit() and pressing return.

Congratulations! You are done with the installation.

For the adventurous

If you have time before the workshops to explore, you can try launching some interactive "Pluto" notebooks by relaunching Julia and typing:

using Pkg; Pkg.activate(joinpath(Pkg.devdir(), "HelloJulia"))
using HelloJulia
pluto_now()

This should launch a window in your browser with "Pluto" at the top. Tutorials 1 and 2 will be covered in "Getting started with the Julia programming language" and Tutorial 3 in "Introduction to using Julia for machine learning".

You can kill the process by returning to the Julia window where you entered the above commands and pressing control-C five or so times, until the julia> prompt returns. Then exit Julia by pressing control-C.

During the workshop

At the workshop you will be asked to relaunch Julia and enter the following code at the julia> prompt:

using Pkg; Pkg.activate(joinpath(Pkg.devdir(), "HelloJulia"))
using HelloJulia
pluto_now()