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.
  1. Select Location Manager > Location Card

  2. Select Location Window > New Project

Step Two: Fill the dialog in the New Project modal.
  1. Enter New Project > Name (lowercase alphanumeric and hyphens)

  2. Optionally enter free text in New Project > Description

  3. (optional) Alter the default path on disk New Project > Path

  4. Click New Project > Next

Step Three: Select a base image container in the New Project modal.
  1. Select the desired image from the defaults in NGC Catalog > Image Card

  2. (optional) Select Custom Container > Text Bar and enter a URL

  3. Select Create

Success: The project tab will open and the container will start building.

The Custom Container option only works with a properly labeled image.

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.
  1. Select Location Manager > Location Card

  2. Select Location Window > Clone Project

Step Three: Enter the URL and initiate the clone in the Clone Project modal.
  1. Paste the URL Clone Project > Repository URL

  2. (optional) Alter the default path on disk Clone Project > Path

  3. 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.

If you are doing a “non-project” clone, there are some edge cases to handle for the selected container and build.

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.
  1. Select the Gear Symbol in the top chrome of an application window to go to the Settings Page

  2. For public GitHub or GitLab, select Integrations > Platform Card

  3. Follow the authentication flow for the selected platform (see self-hosted GitLab here)

Step Two: Open a location and select the project to publish.
  1. Select Locations Manager > Location Card

  2. Select Location Window > Project Card

Step Three: Complete the publishing flow in the Publish Project modal.
  1. Select Project Tab > Publish

  2. Select Publish Project > Git Remote Server

  3. (optional) Select available namespace Publish Project > Namespace

  4. Set visibility Publish Project > Repository Visibility

  5. Select Publish Project > Publish

Success: You will see the Push Complete modal.

You can only publish a project if it has no pending changes to commit.

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.
  1. Select Locations Manager > Location Card

Step Two: Delete the project using the option dots on the project card.
  1. Select Location Window > Project Card > Option Dots > Delete Project

  2. Select Delete Project > Yes, Delete in the modal

Success: The project card will disappear from the location window.

You need to verify the delete if the project has uncommitted changes.

A modal will appear asking you to verify the consequences of the deletion.