Library steps refer to customizable and reusable executions that can be incorporated into Valohai projects. These steps can be either predefined by Valohai’s Ecosystem or custom ones created by users.
Unlike project-specific steps defined in each project’s own valohai.yaml file, library steps are shared across an entire organization.
This articles shows you how to add custom library steps from your public and private Git repositories.
Requirements
- A Git repository containing a valohai.yaml with at least one step and all the other required code files.
- Admin account in your Valohai organization.
Use a public Git-repository
- Click on
Hi, <username>!
on the top right corner. - Select
Manage <organization>
. - Open the Libraries tab.
- Click on the Add a new Library button.
- Name your library. Note that the name can only consist of letters, numbers, underscores or hyphens.
For Public Repositories
-
Add HTTPS URL of the public repository in the respective field.
- The URL looks like
git+https://github.com/<usename>/<repository>.git
- The URL looks like
For Private Repositories
-
Add SSH URL of the private repository in the respective field.
- The URL looks like
git@github.com:<username>/<repository>.git
- The URL looks like
-
Add the SSH private key in the field.
- You can either use the Generate new SSH key button in Valohai or generate the key on your command line with the following command
ssh-keygen -t rsa -b 4096 -f my-project-deploy-key
You will need to add the public key as a deploy key for your repository, see the instructions for different hosting services under our Git section.
- Click on the Add Library button.
- Click on the Update button to fetch the commits.