Makie Texture Atlas Caching

When using Makie offline, I got this warning:

Warning: downloading texture atlas failed, need to re-create from scratch.
exception =
RequestError: Could not resolve host: github.com while requesting https://github.com/MakieOrg/Makie.jl/releases/download/v0.21.0/v7_texture_atlas_2048_64.bin

and later

Warning: Makie is caching fonts, this may take a while. This should usually not happen, unless you're getting your own texture atlas or are without internet!

This is for offline deployment to a computing cluster. Is there a way to download the atlas on a build machine and then copy it to the computing machines so Makie doesn’t need to spend time on the texture atlas and fonts?

You can get the urls and paths Makie expect the texture atlas from this function:

This should allow you to ship it I suppose.
The clean way would be to ship it as an artifact, if you have time for a PR :wink:
We already have an artifact for other assets:
Makie.jl/Makie/Artifacts.toml at master · MakieOrg/Makie.jl · GitHub
Which was generated with this helper script:
Makie.jl/tooling/create-artifacts.jl at 46d9c5e3cb7adacdd0dbe364005baa9a6c656f97 · MakieOrg/Makie.jl · GitHub

1 Like

It seems like there are many texture atlases depending on resolution. How could an artifact-based solution work?

in Theory, yes, but actually we only use one resolution. we used two previously, but now all backends use the same.
So only get_texture_atlas(2048, 64) should be used!
And like previously, if we don’t have an artifact for a combination we’d generate it