> For the complete documentation index, see [llms.txt](https://docs.stg.ai.neevcloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stg.ai.neevcloud.com/gpu-ai-service/byoat.md).

# Bring Your Own AI Template

***

## Overview

The **Bring Your Own AI Template** (BYOT) feature lets you package your custom AI/ML environment as a Docker image and register it on NeevCloud as a deployable template. Once registered, you can reuse the template across GPU deployments without repeating environment setup every time.

This document walks you through building a compatible image, registering it as a template, and managing its lifecycle on the platform.

***

## Before You Begin

Your Docker image must use the NeevCloud-supported base image. Without this, the platform cannot validate or build your template.

**Supported base image:**

```
harbor.neev.work/gpu/ubuntu-24.04:0.1.0
```

Using any other base image will cause the template build to fail during validation.

**Requirements:**

* Use a fixed image tag or digest. Do not use `:latest`.
* Image must be built from the approved NeevCloud base image.
* Image size must be less than 50 GB.
* For private registries, enter registry username and access token.

***

## Step 1: Build Your Docker Image

Follow these steps to prepare a compatible image before registering it on NeevCloud.

1. **Create a Dockerfile**

   Start with a new `Dockerfile` in your project directory.
2. **Set the base image**

   The first line of your Dockerfile must reference the supported base image:

   ```dockerfile
   FROM harbor.neev.work/gpu/ubuntu-24.04:0.1.0
   ```
3. **Install your dependencies**

   Add any Python libraries, system packages, or runtime dependencies your workload requires:

   ```dockerfile
   RUN pip install torch transformers fastapi uvicorn
   ```
4. **Copy your application or model files**

   Copy your model weights, serving scripts, or application code into the image:

   ```dockerfile
   COPY ./app /workspace/app
   COPY ./models /workspace/models
   ```
5. **Set the working directory**

   Define the directory where commands will run inside the container:

   ```dockerfile
   WORKDIR /workspace
   ```
6. **Build the image**

   Run the build command from your project directory. Replace `<registry-path>` with your registry location and `<version>` with a specific version tag:

   ```bash
   docker build -t <registry-path>:<version> .
   ```

   Example:

   ```bash
   docker build -t docker.io/myorg/llm-serving:1.0.0 .
   ```
7. **Push the image to your registry**

   Push the built image using a fixed version tag. Avoid using `latest` as a tag — NeevCloud requires a pinned version to ensure reproducibility across deployments:

   ```bash
   docker push docker.io/myorg/llm-serving:1.0.0
   ```

***

## Step 2: Navigate to My Templates

Once your image is pushed to a registry, you can register it on NeevCloud.

1. Open the **AI Templates** section from the left navigation panel.
2. Click the **My Template** tab.

This tab shows only the templates you or your organization have created. Official NeevCloud templates, Partner templates, and Community templates do not appear here.

If you have not created any templates yet, you will see the message: *"No custom templates created yet."*

***

## Step 3: Add a Custom Template

Click the **Add Template** button to open the template registration drawer.

Fill in the following fields:

***

### Template Name *(Required)*

Give your template a clear, recognizable name so you and your teammates can identify it quickly.

* Allowed characters: letters, numbers, spaces, hyphens, and underscores
* Minimum length: 3 characters
* Maximum length: 100 characters
* Leading and trailing spaces are trimmed automatically
* Template names must be unique within your organization — duplicate names will be rejected

If you leave this field empty, you will see the error: *"Template name is required."*

***

### Registry Path *(Required)*

Enter the full path to your Docker image in the container registry.

Accepted formats:

```
docker.io/myorg/llm-serving:1.0.0
nvcr.io/nvidia/pytorch:24.01-py3
ghcr.io/myorg/custom-model:v2.1
```

Two things to keep in mind:

* The path must include both the repository and a version tag. If the tag is missing, you will see the error: *"Image tag is required."*
* If the format does not follow a valid registry pattern, you will see: *"Invalid registry path format."*

***

### Registry Username *(Optional)*

Provide this only if your registry requires authentication . If your image is hosted in a public registry, you can leave this blank.

***

### Access Token *(Optional)*

Provide a personal access token if your registry is private. If your registry requires authentication and no token is provided, the image pull will fail.

After saving, the token is stored securely and will no longer be visible in the UI. It is never exposed in logs or on screen.

***

### Category *(Required)*

Select the category that best describes your template's purpose. This determines which filter the template appears under when browsing.

Available categories:

* Deep Learning *(default)*
* LLM Inference
* Image Generation
* Fine-Tuning
* Model Serving
* Development
* Training
* Other

Only one category can be selected. If your use case does not fit any specific category, select **Other**.

***

### Description *(Required)*

Write a short description of what the template does, what model or framework it runs, and any relevant details your teammates might need.

* Plain text only
* Maximum length: 300 characters

A clear description helps your organization understand the template's purpose without having to inspect the image directly.

***

After you click **Add Template**, the platform begins processing your image automatically. You do not need to trigger this manually.

When validation succeeds, Your template is now deployable.

***

## Managing Your Templates

### Template Card

Each template card displays the following information at a glance:

* Template name
* Registry path
* Description

### Deleting a Template

To remove a template, click the **Delete** icon on the template card. A confirmation dialog will appear with the message: *"Are you sure you want to delete this template?"*

Clicking **Confirm** permanently deletes the template. Deleted templates cannot be recovered.

### Finding Your Templates

Your templates appear in the **My Template** tab under all matching category filters. You can also find them under the **All** filter. They do not appear in NeevCloud's official template listings.

***

## Deploying with Your Template

1. Go to the **My Template** tab and locate the template you want to use.
2. Click the template card to select it. The **Deploy with selected template** button becomes active.
3. Click **Deploy** to proceed to the GPU deployment workflow. Your selected template is automatically applied to the deployment configuration.

***

## Persistence

Your templates are stored in NeevCloud's backend database. They remain available:

* After you log out and log back in
* After a browser refresh
* Across sessions on any device

Template metadata — name, registry path, category, description, and visibility — remains consistent across all sessions.
