Skip to main content

Get started

Overview

You'll have an understanding of building a Docker image, deploying a Serverless endpoint, and sending a request. You'll also have a basic understanding of how to customize the handler for your use case.

Prerequisites

This section presumes you have an understanding of the terminal and can execute commands from your terminal.

RunPod

To continue with this quick start, you'll need the following from RunPod:

  • RunPod account
  • RunPod API Key

Docker

To build your Docker image, you'll need the following:

  • Docker installed
  • Docker account

GitHub

To clone the worker-template repo, you'll need access to the following:

  • Git installed
  • Permissions to clone GitHub repos

Build and push your Docker image

This step will walk you through building and pushing your Docker image to your container registry. This is useful to building custom images for your use case.

  1. Clone the worker-template:

gh repo clone runpod-workers/worker-template

  1. Navigate to the root of the cloned repo:

cd worker-template

  1. Build the Docker image:

docker build --platform linux/amd64 --tag <username>/<repo>:<tag> .

  1. Push your container registry:

docker push <username>/<repo>:<tag>

note

When building your docker image, you might need to specify the platform you are building for. This is important when you are building on a machine with a different architecture than the one you are deploying to.

When building for RunPod providers use --platform=linux/amd64.

Now that you've pushed your container registry, you're ready to deploy your Serverless Endpoint to RunPod.

Deploy a Serverless Endpoint

This step will walk you through deploying a Serverless Endpoint to RunPod. You can refer to this walkthrough to deploy your own custom Docker image.

  1. Log in to the RunPod Serverless console.
  2. Select + New Endpoint.
  3. Provide the following:
    1. Endpoint name.
    2. Select your GPU configuration.
    3. Configure the number of Workers.
    4. (optional) Select FlashBoot.
    5. (optional) Select a template.
    6. Enter the name of your Docker image.
      • For example <username>/<repo>:<tag>.
    7. Specify enough memory for your Docker image.
  4. Select Deploy.

Now, let's send a request to your Endpoint.