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.
- Clone the worker-template:
gh repo clone runpod-workers/worker-template
- Navigate to the root of the cloned repo:
cd worker-template
- Build the Docker image:
docker build --platform linux/amd64 --tag <username>/<repo>:<tag> .
- Push your container registry:
docker push <username>/<repo>:<tag>
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.
- Log in to the RunPod Serverless console.
- Select + New Endpoint.
- Provide the following:
- Endpoint name.
- Select your GPU configuration.
- Configure the number of Workers.
- (optional) Select FlashBoot.
- (optional) Select a template.
- Enter the name of your Docker image.
- For example
<username>/<repo>:<tag>
.
- For example
- Specify enough memory for your Docker image.
- Select Deploy.
Now, let's send a request to your Endpoint.