Git LFS autofetch for the integrated GitHub repositories?

Hi Renku team!

I was wondering if there is a way to set up the project with connected GitHub repo to pull the LFS files upon session launch?
Currently I do so from the terminal, after the session starts. But I would love for the notebooks to be all ready-to-go right away.

I have looked through the documentation, and have not found found anything specific. (I did stumble upon renku.ini configs that had git_lfs_autofetch = true but it seems like it was an option for the legacy Renku?)

Thank you!

Hi @time-trader :waving_hand:
Are you using the “Create from code” option to setup your session environment?
In this case, you can add init scripts to the repository e.g. init.d/git_lfs_fetch.sh which will run when the session starts. All the files with the .sh extension in the init.d/ folder are run at startup.

With this option you can attempt to run git LFS fetch on session start.

Also to be noted:

  • You can use bash for the scripts (#!/bin/bash)
  • $RENKU_WORKING_DIR will be the location of the session workspace, so you can cd $RENKU_WORKING_DIR/my_repo to get a repository