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

Preinstall packages for offline access #126

Open
JamieJQuinn opened this issue Nov 12, 2022 · 0 comments
Open

Preinstall packages for offline access #126

JamieJQuinn opened this issue Nov 12, 2022 · 0 comments

Comments

@JamieJQuinn
Copy link

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant