Skip to content

Preinstall packages for offline access #126

Description

@JamieJQuinn

Not strictly an issue; I just thought this may be useful to others. Also not an expert in Julia so if there's an easier way to do this please do correct the script.

I wanted to access the notebooks offline but due to Pluto installing packages per notebook, each notebook must be instantiated while having internet access. This script does that for every notebook in the notebooks directory in the Spring21 branch:

using Glob
import Pluto
import Pkg

function main()
  dirs = glob("./week*/*.jl")
  for jl_file in dirs
    println(jl_file)
    Pluto.activate_notebook_environment(jl_file)
    Pkg.instantiate()
  end
end

main()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions