Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
![RunPod Worker Template](https://cpjrphpz3t5wbwfe.public.blob.vercel-storage.com/worker-template_banner-zUuCAjwDuvfsINR6vKBhYvvm3TnZFB.jpeg)
![Runpod Worker Template](https://cpjrphpz3t5wbwfe.public.blob.vercel-storage.com/worker-template_banner-zUuCAjwDuvfsINR6vKBhYvvm3TnZFB.jpeg)

---

This repository serves as a starting point for creating your own custom RunPod Serverless worker. It provides a basic structure and configuration that you can build upon.
This repository serves as a starting point for creating your own custom Runpod Serverless worker. It provides a basic structure and configuration that you can build upon.

---

[![RunPod](https://api.runpod.io/badge/runpod-workers/flash)](https://www.runpod.io/console/hub/runpod-workers/flash)
[![Runpod](https://api.runpod.io/badge/runpod-workers/flash)](https://www.runpod.io/console/hub/runpod-workers/flash)

---

Expand All @@ -15,7 +15,7 @@ This repository serves as a starting point for creating your own custom RunPod S
1. **Use this template:** Create a new repository based on this template or clone it directly.
2. **Customize:** Modify the code and configuration files to implement your specific task.
3. **Test:** Run your worker locally to ensure it functions correctly.
4. **Deploy:** Connect your repository to RunPod or build and push the Docker image manually.
4. **Deploy:** Connect your repository to Runpod or build and push the Docker image manually.

## Python Version Support

Expand Down Expand Up @@ -47,15 +47,15 @@ Image tags follow the pattern `py{version}-{tag}` (e.g., `runpod/flash:py3.12-la
- **`requirements.txt`:** Add any Python libraries your worker needs to this file. These will be installed via `uv` when the Docker image is built.
- **`Dockerfile`:**
- This file defines the Docker image for your worker.
- It starts from a [RunPod base image (`runpod/base`)](https://github.com/runpod/containers/tree/main/official-templates/base) which includes CUDA, mulitple versions of python, uv, jupyter notebook and common dependencies.
- It starts from a [Runpod base image (`runpod/base`)](https://github.com/runpod/containers/tree/main/official-templates/base) which includes CUDA, mulitple versions of python, uv, jupyter notebook and common dependencies.
- It installs dependencies from `requirements.txt` using `uv`.
- It copies your `src` directory into the image.
- You might need to add system dependencies (`apt-get install ...`), environment variables (`ENV`), or other setup steps here if required by your specific application.
- **`test_input.json`:** Modify this file to provide relevant sample input for local testing.

## Testing Locally

You can test your handler logic locally using the RunPod Python SDK. For detailed steps on setting up your local environment (creating a virtual environment, installing dependencies) and running the handler, please refer to the [RunPod Serverless Get Started Guide](https://docs.runpod.io/serverless/get-started).
You can test your handler logic locally using the Runpod Python SDK. For detailed steps on setting up your local environment (creating a virtual environment, installing dependencies) and running the handler, please refer to the [Runpod Serverless Get Started Guide](https://docs.runpod.io/serverless/get-started).

1. **Prepare Input:** Modify `test_input.json` with relevant sample input for your handler.
2. **Run the Handler:**
Expand All @@ -64,22 +64,22 @@ You can test your handler logic locally using the RunPod Python SDK. For detaile
```
This will execute your `handler` function with the contents of [`test_input.json`](/test_input.json) as input.

## Deploying to RunPod
## Deploying to Runpod

There are two main ways to deploy your worker:

1. **GitHub Integration (Recommended):**

- Connect your GitHub repository to RunPod Serverless. RunPod will automatically build and deploy your worker whenever you push changes to your specified branch.
- For detailed instructions on setting up the GitHub integration, authorizing RunPod, and configuring your deployment, please refer to the [RunPod Deploy with GitHub Guide](https://docs.runpod.io/serverless/github-integration).
- Connect your GitHub repository to Runpod Serverless. Runpod will automatically build and deploy your worker whenever you push changes to your specified branch.
- For detailed instructions on setting up the GitHub integration, authorizing Runpod, and configuring your deployment, please refer to the [Runpod Deploy with GitHub Guide](https://docs.runpod.io/serverless/github-integration).

2. **Manual Docker Build & Push:**
- For detailed instructions on building the Docker image locally and pushing it to a container registry, please see the [RunPod Serverless Get Started Guide](https://docs.runpod.io/serverless/get-started#step-6-build-and-push-your-docker-image).
- Once pushed, create a new Template or Endpoint in the RunPod Serverless UI and point it to the image in your container registry.
- For detailed instructions on building the Docker image locally and pushing it to a container registry, please see the [Runpod Serverless Get Started Guide](https://docs.runpod.io/serverless/get-started#step-6-build-and-push-your-docker-image).
- Once pushed, create a new Template or Endpoint in the Runpod Serverless UI and point it to the image in your container registry.

## Further Information

- [RunPod Serverless Documentation](https://docs.runpod.io/serverless/overview)
- [Runpod Serverless Documentation](https://docs.runpod.io/serverless/overview)
- [Python SDK](https://github.com/runpod/runpod-python)
- [Base Docker Images](https://github.com/runpod/containers/tree/main/official-templates/base)
- [Community Discord](https://discord.gg/cUpRmau42Vd)