Skip to content

Commit

Permalink
Merge pull request #1078 from gchq/docs/docker-image-docs
Browse files Browse the repository at this point in the history
Docs/docker image docs
  • Loading branch information
a3957273 authored Feb 13, 2024
2 parents 672c96e + cd54d39 commit 4a731cd
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
6 changes: 6 additions & 0 deletions frontend/pages/docs/directory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export const flatDirectory: Array<DirectoryEntry> = [
{ title: 'Uploading Images', slug: 'users/managing-models-and-releases/upload-to-bailo/images' },

{ title: 'Using a Model', slug: 'users/using-a-model', header: true },
{ title: 'Using a a Pushed Docker Image', slug: 'users/using-a-model/using-a-pushed-docker-image' },

{ title: 'Reviews', slug: 'users/reviews', header: true },
{ title: 'Programmatically using Bailo', slug: 'users/programmatically-using-bailo', header: true },
{ title: 'Authentication', slug: 'users/programmatically-using-bailo/authentication' },
Expand All @@ -52,6 +54,10 @@ export const flatDirectory: Array<DirectoryEntry> = [

// Markdown
{ title: 'Markdown Examples', slug: 'markdown-examples' },

// V2
{ title: 'V2', slug: 'v2', header: true },
{ title: 'Model Images', slug: 'v2/model-images' },
]

export interface DirectoryTree {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import DocsWrapper from 'src/docs/DocsWrapper'
import Image from 'next/legacy/image'

import pushingAnImage from '../../../../public/docs/Pushing-an-image.png'
import registryTab from '../../../../public/docs/Registry-tab.png'
import selectingAnImage from '../../../../public/docs/Selecting-an-image.png'
import ModelReleaseImageList from '../../../../public/docs/Model-release-images.png'

# Model Images

## Pushing a Docker image

Images can be pushed to the Docker registry attached to the hosted Bailo environment. These images can be assigned to
specific models so that they can be attached to releases. The steps on doing this will be detailed below, but can also
be found inside the UI on the registry of a model.

<Image src={registryTab} />

Clicking on the "Push Image" button will display a dialog window that will make the process easier, but essentially the
process is:

- Create a token in the UI to make sure you have the correct Docker permissions (this will give you a secret key and an
access key that will be used to authentication)
- Run the command `docker login <registryAddress> -u <accessKey>`
- It will ask for a password, this is the secretKey property from the token you created earlier
- Run the command `docker tag <image> <registryAddress>/<modelId>/<imageName>:<tag>`
- Run the command `docker push <registryAddress>/<modelId>/<imageName>:<tag>`

## Using a pushed Docker image as part of a model release

Once you have pushed a Docker image to the registry it will be made available for use when drafting a model release. As
the image has been assigned to the model using the steps in the previous page, all you need to do is select the image
using the drop down on the release creating page like so:

<Image src={selectingAnImage} />

## Accessing an image

When an image is attached to a release, you will see them listed as part of the release display in the `Releases` tab on
the model page like so:

<Image src={ModelReleaseImageList} />

These paths can be copied for use in the following command:

`docker pull <imagePath>`

export default ({ children }) => <DocsWrapper>{children}</DocsWrapper>
Binary file added frontend/public/docs/Model-release-images.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/docs/Pushing-an-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/docs/Registry-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/docs/Selecting-an-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4a731cd

Please sign in to comment.