Create, Clone, Publish and Delete Projects
Key Concepts
Create
Initiating a net new project in a location with a simple default structure.
Equivalent to git init —template <template> with the default structure, including the .project/spec.yaml file.
Clone
Equivalent to git clone <repository>.
Detects an existing .project/spec.yaml file and uses it for the container build.
If there is no .project/spec.yaml file, prompts you to pick a base image and then scaffolds a default .project/spec.yaml file.
Clone and Detach
Equivalent to git clone <repository> combined with removing all branches except for main. In addition, removes the entire history and starts from a new commit.
Publish
Pushes a new repository to the intended Git platform. Equivalent to creating the repository on the platform, adding the remote origin, and pushing the project. Currently only supports GitHub, GitLab and self-hosted GitLab.
Git platform
Supported examples are GitHub, public GitLab and self-hosted GitLab. You must have an account to a Git platform to publish a project.
Create New Project
Step One: Open a location and start project creation.
- Select Location Manager > Location Card
- Select Location Window > New Project
Step Two: Fill the dialog in the New Project modal.
- Enter New Project > Name (lowercase alphanumeric and hyphens)
- Optionally enter free text in New Project > Description
- (optional) Alter the default path on disk New Project > Path
- Click New Project > Next
Step Three: Select a base image container in the New Project modal.
- Select the desired image from the defaults in NGC Catalog > Image Card
- (optional) Select Custom Container > Text Bar and enter a URL
- Select Create
Success: The project tab will open and the container will start building.
Image labels are required to create .project/spec.yaml. Default images have them.
Clone an Existing Repository
Step One: Get the repository URL.
If the repository is private, it must come from GitHub, GitLab or a private GitLab instance that you have access to. This requires you to have the relevant integration configured.
If it is public, it can come from any Git platform, for example BitBucket or Codeberg.
Step Two: Open a location and clone using the URL.
- Select Location Manager > Location Card
- Select Location Window > Clone Project
Step Three: Enter the URL and initiate the clone in the Clone Project modal.
- Paste the URL Clone Project > Repository URL
- (optional) Alter the default path on disk Clone Project > Path
- Select Clone Project > Clone
Step Four: Select Clone or Clone and Detach
Clone keeps the remote origin. Use this option if you want to pull upstream changes to your local repository. However, you can’t push changes back unless you are a collaborator on the repository. If the repository is on GitHub, GitLab or self-hosted GitLab, you can fork and then clone to get upstream changes but also maintain your own.
Clone and Detach removes the remote origin. Use this option if you want to push local changes to your own account in GitHub, GitLab or self-hosted GitLab. However, this will prevent you from getting upstream changes to the original repository. If the repository is on GitHub, GitLab or self-hosted GitLab, you can fork and then clone to get upstream changes but also maintain your own.
Step Five (non-project): Select base image
If the repository does not have a .project/spec.yaml file, AI Workbench will alert you and ask you to pick a default base image.
Select one of the base images and proceed.
Success: The project tab will open and the container will start building.
AI Workbench uses a prescriptive container build process that will look for and configuration files from the top level of the repository.
If the repository you are cloning has those files, they will be used during the build and this may require you to handle conflicts.
Those files are: requirements.txt, apt.txt, and preBuild.bash and postBuild.bash.
If they are not in the top level of the repository, Workbench should build the container with no issues.
Publish Project
Step One: Connect the Git platform to AI Workbench.
- Select the Gear Symbol in the top chrome of an application window to go to the Settings Page
- For public GitHub or GitLab, select Integrations > Platform Card
- Follow the authentication flow for the selected platform (see self-hosted GitLab here)
Step Two: Open a location and select the project to publish.
- Select Locations Manager > Location Card
- Select Location Window > Project Card
Step Three: Complete the publishing flow in the Publish Project modal.
- Select Project Tab > Publish
- Select Publish Project > Git Remote Server
- (optional) Select available namespace Publish Project > Namespace
- Set visibility Publish Project > Repository Visibility
- Select Publish Project > Publish
Success: You will see the Push Complete modal.
You will be prompted to commit or discard any pending changes.
Delete Existing Project
Step One: Open a location and select the project to publish.
- Select Locations Manager > Location Card
Step Two: Delete the project using the option dots on the project card.
- Select Location Window > Project Card > Option Dots > Delete Project
- Select Delete Project > Yes, Delete in the modal
Success: The project card will disappear from the location window.
A modal will appear asking you to verify the consequences of the deletion.