After creating a Dockerfile for your worker, you can build the image, test it locally, and deploy it to a Serverless endpoint.Documentation Index
Fetch the complete documentation index at: https://runpod-b18f5ded-promptless-remove-flash-beta-notification.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- A Dockerfile that packages your handler function.
- Docker installed on your development machine.
- A Docker Hub account.
Build the Docker image
From your terminal, navigate to your project directory and build the Docker image:DOCKER_USERNAME with your Docker Hub username, WORKER_NAME with a descriptive name for your worker, and VERSION with an appropriate version tag.
Test the image locally
Before pushing it to the registry, you should test your Docker image locally:Push the image to Docker Hub
Make your image available to Runpod by pushing it to Docker Hub:Image versioning
For production workloads, use SHA tags for absolute reproducibility:- Avoid the
:latesttag for production. The:latesttag is mutable—it changes every time you push a new image without specifying a version. This creates several problems:- Unpredictable deployments: You can’t guarantee which version of your code is running, making it difficult to reproduce issues or roll back to a known-good state.
- Debugging difficulties: When problems occur, you won’t know which exact image version caused them.
- Caching conflicts: Runpod caches images for faster worker startup. If you push a new
:latestimage, workers may continue using the cached version, leading to confusion about which code is actually running.
- Use semantic versioning (e.g.,
v1.0.0,v1.0.1) for clarity and easy rollbacks. - Use SHA tags for absolute reproducibility in critical deployments.
- Document the specific image version or SHA in your deployment documentation.
- Keep images as small as possible for faster startup times.
Deploy an endpoint
You can deploy your worker image directly from a Docker registry through the Runpod console:- Navigate to the Serverless section of the Runpod console.
- Click New Endpoint.
- Click Import from Docker Registry.
- In the Container Image field, enter your Docker image URL (e.g.,
docker.io/yourusername/worker-name:v1.0.0), then click Next. - Configure your endpoint settings:
- Enter an Endpoint Name.
- Choose your Endpoint Type: select Queue for traditional queue-based processing or Load Balancer for direct HTTP access (see Load balancing endpoints for details).
- Under GPU Configuration, select the appropriate GPU types for your workload.
- Configure other settings as needed (active/max workers, timeouts, environment variables).
- Click Deploy Endpoint to deploy your worker.
Troubleshoot deployment issues
If your worker fails to start or process requests:- Check the logs in the Runpod console for error messages.
- Verify your handler function works correctly in local testing.
- Ensure all dependencies are properly installed in the Docker image.
- Check that your Docker image is compatible with the selected GPU type.
- Verify your input format matches what your handler expects.