Core installation and swapping

I suspect this is not currently possible reading the tk-core code but is it possible to not localize the tk-core module into a given configuration? i.e. the core module copied here tk-core/python/tank/bootstrap/cached_configuration.py at master · shotgunsoftware/tk-core · GitHub. The initial copy and subsequent core swapping accounts for a significant amount of the SGTK bootstrapping time and I was wondering what the rationale is for copying it across?

Thanks,

Dom

Sure is possible. Have a read about bundle_cache folder in the config.

https://developers.shotgridsoftware.com/tk-core/initializing.html

If you control the environment before these operations you can set SHOTGUN_BUNDLE_CACHE_PATH or SHOTGUN_BUNDLE_CACHE_FALLBACK_PATHS
Environment Variables — tk-core v0.20.28 documentation to centrally cache apps in one location.

Hey Halil,

Thanks for your response. I had read about the bundle cache paths before but we want to be able to distribute our apps as we are using Rez - i.e. we do not want to flatten out our app code structure into one location.

Thanks,

Dominique

So you want tk-core from the app_store to only be the one app that is centralised into the configuration and the others distributed and cached per user?

If you do set SHOTGUN_BUNDLE_CACHE_FALLBACK_PATHS or include a bundle_cache/app_store folder in the configuration you do not need to include ALL the apps, only those you want pre cached.

No. We have our own version of tk-core on disk and we would like to pull this from its current location on disk without copying it across to the bundle cache location (i.e. ~/.shotgun/netflixvfx/p5192.basic.nuke/cfg/install/core).

So for example, say my tk-core is located at /some/file/structure/tk-core

To use the SHOTGUN_BUNDLE_CACHE_FALLBACK_PATHS I presumably would have to rearchitect the folder structure to:

/some/file/structure/bundle_cache/app_store/tk-core

and then do:

export SHOTGUN_BUNDLE_CACHE_FALLBACK_PATHS=/some/file/structure/bundle_cache/app_store/tk-core

To pick it up and it therefore would not be copied?