Community-contributed project templates

By default, renku projects are initialized using our basic templates collection but many Renku users come up with interesting and useful project configuration that can be very useful also for others. This is why we support custom templates, which allow anyone to turn a publicly-available git repository into a source of templates. In order to pull together a curated collection of such useful “expansion” templates, we have created a contributed project templates repository, where the Renku community can share and exchange useful templates. Our first two examples are a template for boostrapping a project that connects to AiiDA (thanks to Leo Talirz) and a template that adds a basic streamlit configuration to the project (thanks @LiliGasser!), making it immediately dashboard-ready.

Contributing to community templates

We would be thrilled if you wanted to contribute a project template to the contributed template repository! If you are not sure if your idea for a template qualifies or if you don’t know how to turn your project configuration into a template, please reach out either as a comment to this topic, by opening an issue or a pull request in the template repository.

If you simply wish that a template for a certain kind of project existed, we would also like to know! Let us know either here or in the contributed project templates issue page.

How do I use the custom templates?

You can use a template from this community-contributed collection (or from any other source) when you initialize a renku project, whether via the web UI or the command-line tool.

Using the web UI

Using custom templates from the web-UI is quite straightforward. On the new project page, under Template Source select Custom, enter the URL of the template repository (in this case https://github.com/SwissDataScienceCenter/contributed-project-templates) and give a valid repository reference (typically you would use a tag or the master or main branch):

Once this is entered, you can click on Fetch templates and select which template you would like to use. Depending on the template, it may ask you for additional information here, e.g. in the case of the “streamlit” template we are asked to enter the project description.

Once you are satisfied, click Create project and a new project using the template will be created.

Using the renku CLI

In the CLI you can choose a template when making a new project by specifying the template source using a flag to renku init:

renku init --template-source \
https://github.com/SwissDataScienceCenter/contributed-project-templates \ 
--template-ref main \
test-template

Fetching template from https://github.com/SwissDataScienceCenter/contributed-project-templates@main...
OK
  INDEX  ID                        PARAMETERS
-------  ------------------------  -----------------------
      1  aiida                     description,archive_url
      2  python-minimal-streamlit  description
Please choose a template by typing the index:

After choosing the template you want to use, you will be asked to provide information about any of the additional parameters that the template requires.

That’s it! I hope you’ll find these new templates useful and that you might in the future contribute your own!

2 Likes

Hi @rrrrrok,

I am unable to Fetch templates into Renkulb from the contributed-project-templates repository. I get the following message :

1 Like

Hi @champost yes, we need better URL handling here… but it’s because of the trailing / - if you remove it, it will work. I’ll make an issue for this so we can fix it.

1 Like

I can confirm that It works without the trailing /.

Perfect, thanks! I’ve opened up an issue to fix this, will hopefully be done in the next sprint. Thanks for the reminder!