# ANN: mybinder.org support for Julia 1.x and Project.toml

**URL:** <https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522>\
**Category:** Community\
**Tags:** announcement, binder\
**Created:** [March 30, 2019, 1:15am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522 "2019-03-30T01:15:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [March 30, 2019, 1:15am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/1 "2019-03-30T01:15:31Z")

</div>

[mybinder.org](https://mybinder.org/) now supports julia 1.x, including `Project.toml` and `Manifest.toml` files, out of the box.

How do you use it? You create a github repo, put a `Project.toml` and `Manifest.toml` in the root and add some Jupyter Notebooks to the repo. Then you go to [https://mybinder.org/](https://mybinder.org/) and enter the URL of your github repository. What you get there is a link that you can for example embed in a web page, share with someone else etc.

What happens if someone clicks on that link? It will automatically spin up a VM instance in the cloud (I believe Google hosted), provision it with exactly the julia environment that is specified in the `Project.toml` and `Manifest.toml`, and then it takes you to a hosted version of IJulia notebook where you can run code and do whatever you want. It is like a small, free Julia Box, with the additional option to easily share a pre-configure environment with others! It supports both the traditional Jupypter Notebook, and JupyerLab.

What are some scenarios where this might be useful? Here are three scenarios: 1) You want to provide replication code for a scientific paper, with this setup you can create something that replicates the computational environment exactly that one needs to run your code, _and_ provide a one-click link to a fully provisioned computing environment to run your code. 2) You want to teach a course. You can provision a computational environment that has all the packages pre-installed that you need, and then share that link with the participants of your course, so that they don’t need to install anything to run the course content. 3) you want to provide example code or tutorials for your package, not as static documentation, but as runnable notebooks. I’m sure there are many more use-cases!

All the new Julia support we added over the last couple of weeks should also be available for groups that host their own JuptyerHub and have integrated that with their own BinderHub (for example UC Berkeley provides that kind of infrastructure on campus). In that case you wouldn’t be using the free, public hosted VMs to run stuff, but can use your own computational resources.

This was all exceptionally pleasant joint work between @NHDaly, the awesome Jupyter Binder team and myself.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [March 30, 2019, 1:58am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/2 "2019-03-30T01:58:12Z")

</div>

I probably should have included an example of this kind of link 🙂 Here we go:

> **[GitHub: davidanthoff/bindertest/master](https://mybinder.org/v2/gh/davidanthoff/bindertest/master?filepath=src%2Fmain.ipynb)**
>
> Click to run this interactive environment. From the Binder Project: Reproducible, sharable, interactive computing environments.

And here is the repo that powers this example:

> **[GitHub - davidanthoff/bindertest](https://github.com/davidanthoff/bindertest)**
>
> Contribute to davidanthoff/bindertest development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [March 30, 2019, 2:07am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/3 "2019-03-30T02:07:17Z")

</div>

> [@davidanthoff](#):
>
> It will automatically spin up a VM instance in the cloud (I believe Google hosted), provision it with exactly the julia environment that is specified in the `Project.toml` and `Manifest.toml` ,

It can take a “long” time to spin up such an environment because the installations of packages needs to happen every time a docker image is spun up?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [March 30, 2019, 2:43am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/4 "2019-03-30T02:43:44Z")

</div>

Yes, but sometimes it is also super fast. I think there is some caching of docker images going on, including with all packages installed. So if you are lucky and the cached image is still around, you might not have to wait at all. At least that is what I think is going on, I’m actually not sure, though 🙂

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [March 30, 2019, 1:52pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/5 "2019-03-30T13:52:37Z")

</div>

As I wrote [here](https://discourse.julialang.org/t/using-julia-in-binder-interactive-web-environment-for-running-your-code/21802), I think that it takes an awfully long time to create the Docker image and install all the packages. This happens basically after every commit to the repository. Once the image is done, it’s cached and will be immediately ready to use. As I suggested in the linked post, show the log to see what’s going on 😉

---

<div class="post-metadata">

**Author:** ![betatim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/betatim/32/7709_2.png) [@betatim](https://discourse.julialang.org/u/betatim)\
**Post date:** [March 30, 2019, 5:42pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/6 "2019-03-30T17:42:03Z")

</div>

> [@xiaodai](#):
>
> > It will automatically spin up a VM instance in the cloud (I believe Google hosted), provision it with exactly the julia environment that is specified in the `Project.toml` and `Manifest.toml` ,
> 
> It can take a “long” time to spin up such an environment because the installations of packages needs to happen every time a docker image is spun up?

Minor nitpick: we only build the image once, if the repository doesn’t change the image stays the same and launch times depend on how popular the repository is, how big the image is (5GB images take longer to transfer than 200MB images), etc.

I just wrote a post on how to create Binder launch links, I think a practice that is becoming a “best practice” is to link people to a particular tag/branch and not to `master` to avoid them potentially having to wait for rebuilds.

> **[How do Binder launch links work or "wait I can do that with a link?"](https://discourse.jupyter.org/t/how-do-binder-launch-links-work-or-wait-i-can-do-that-with-a-link/647?u=betatim)**
>
> This is a post that explain what the different parts of a Binder launch link mean. What is a Binder launch link? This is one: https://mybinder.org/v2/gh/binder-examples/requirements/master If you click this link it will take you to a live...

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [March 31, 2019, 1:53am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/7 "2019-03-31T01:53:16Z")

</div>

Thanks for clarifying this, @betatim! I should add that @betatim was the Jupyter Binder team member who shepherded and helped us with all of this, thanks again 🙂

---

<div class="post-metadata">

**Author:** ![betatim](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/betatim/32/7709_2.png) [@betatim](https://discourse.julialang.org/u/betatim)\
**Post date:** [March 31, 2019, 5:20am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/8 "2019-03-31T05:20:16Z")

</div>

Thanks to you and @NHDaly for taking the time to be our Julia experts! We need the contributions from people who use a particular language every day to help get things right and make them feel “Julia-stic” (Is there a Julia equivalent to Pythonic?)

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 31, 2019, 6:09am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/9 "2019-03-31T06:09:29Z")

</div>

> [@betatim](#):
>
> “Julia-stic” (Is there a Julia equivalent to Pythonic?)

Some people use “Julian”.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [April 1, 2019, 2:19pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/10 "2019-04-01T14:19:04Z")

</div>

I think I’m actually most excited about the potential to at some point use [PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) to create a custom sysimage with [mybinder.org](https://mybinder.org/), see [this](https://github.com/jupyter/repo2docker/issues/601) issue.

If we can pull that off, the whole compiled sysimage (that includes the packages that are added to `Package.toml`) would be cached in the docker image, and I would expect that one could get _really_ good responsiveness that way.

Right now [PackageCompiler.jl](https://github.com/JuliaLang/PackageCompiler.jl) is probably not stable enough to run it by default, but hopefully that will improve over time. @arnavsood and @jlperla are currently investigating slightly more involved manual ways to pull this off (so this would be a bit more involved on the side of the person that creates the mybinder link, not on the user side).

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [April 1, 2019, 11:18pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/11 "2019-04-01T23:18:24Z")

</div>

> [@davidanthoff](#):
>
> If we can pull that off

It’s bound to happen at some point. I love using it to compile Plots and GR and DataFrames. Actually I maintain a DataBundle of packages where I save the sys.dll.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 4, 2019, 5:33pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/12 "2019-04-04T17:33:51Z")

</div>

Would it make sense to search for `Project.toml` from the notebook directory and up towards the root and use the first one you encounter? Having the project file in the root would then still work, but it makes it possible to have some more fine grained control.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [April 4, 2019, 5:50pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/13 "2019-04-04T17:50:00Z")

</div>

It might well make sense to change [this](https://github.com/jupyter/repo2docker/blob/8d8c21e55e22a9aacae6be29fb7ca9517201d606/repo2docker/buildpacks/julia/julia_project.py#L70) line so that `JULIA_PROJECT=@.`, I’m just not sure, so any further thoughts on that would be great.

I do think that if we go towards a model where we try to use PackageCompiler.jl by default on mybinder, then it would be easier if there was just _the one_ project in the root, right?

---

<div class="post-metadata">

**Author:** ![jlperla](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlperla/32/34332_2.png) [@jlperla](https://discourse.julialang.org/u/jlperla)\
**Post date:** [April 4, 2019, 5:56pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/14 "2019-04-04T17:56:05Z")

</div>

Yes. I just think that for the foreseeable future it will require whitelisting packages.

I also like the idea of recursively going up the tree until it finds a manifest. Makes for organizing notebooks in directories easier.

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [April 4, 2019, 5:58pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/15 "2019-04-04T17:58:54Z")

</div>

> [@davidanthoff](#):
>
> I do think that if we go towards a model where we try to use PackageCompiler.jl by default on mybinder, then it would be easier if there was just _the one_ project in the root, right?

Maybe, but then all notebooks in the repo needs to be compatible with the same Julia version and set of packages.

> [@davidanthoff](#):
>
> I do think that if we go towards a model where we try to use PackageCompiler.jl by default on mybinder, then it would be easier if there was just _the one_ project in the root, right?

Right, but you can still have just one project file if you want. I’d be in favor of `@.`.

---

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [October 14, 2019, 7:02pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/16 "2019-10-14T19:02:43Z")

</div>

Thanks a lot!  
Could you help me with the use case:  
I have `notebook` folder in my Pkg and notebooks require some additional packages which are not listed in `[deps]` part of `Project.toml`. Can I add those additional packages to `mybinder` environment , for example, with `[extras], [targets]` fields in `Project.toml`? I can add those packages inside of the notebooks with `Pkg.add` but it makes code less stable to pkg changes

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 14, 2019, 8:32pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/17 "2019-10-14T20:32:39Z")

</div>

Yeah, right now mybinder only instantiates any `Project.toml` that it finds in the root. I think what you could do is add a `Project.toml` and `Manifest.toml` in the `notebook` folder, and then at the top of the notebook you do something like

```julia
using Pkg
pkg"activate ."
pkg"instantiate"

```

and that might work?

---

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [October 14, 2019, 8:57pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/18 "2019-10-14T20:57:07Z")

</div>

Thanks! It solves my problem

---

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [October 21, 2019, 9:34pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/19 "2019-10-21T21:34:51Z")

</div>

@davidanthoff Is it possible to configure resources for provisioned `mybinder` environments. The question is related to this issue  
[https://github.com/JuliaMatrices/BlockBandedMatrices.jl/issues/45](https://github.com/JuliaMatrices/BlockBandedMatrices.jl/issues/45)

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [October 23, 2019, 5:04pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/20 "2019-10-23T17:04:28Z")

</div>

Not that I’m aware of.

[Next page](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522.md?page=2)
