Skip to content

Add tutorial for building a dual-mode Serverless worker #274

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 17, 2025
Merged

Conversation

muhsinking
Copy link
Collaborator

@muhsinking muhsinking commented Jun 3, 2025

This PR adds a new tutorial document on building a dual-mode Serverless worker, promoting a "Pod-first" development workflow.

This guide is designed to help users overcome common challenges in Serverless development, such as slow iteration times and debugging difficulties. It introduces a method for creating a flexible Docker image that can operate as both a RunPod Pod for interactive development and a Serverless worker for production.

The tutorial provides step-by-step instructions for:

  • Setting up a project with handler.py, start.sh, and Dockerfile.
  • Creating a handler that adapts its behavior based on a MODE_TO_RUN environment variable.
  • Writing a startup script to manage different operational modes.
  • Building and deploying the Docker image.
  • Testing the worker in both Pod and Serverless environments.

@muhsinking muhsinking marked this pull request as ready for review June 11, 2025 13:47
@muhsinking muhsinking merged commit bdf63c9 into main Jun 17, 2025
1 check passed
@muhsinking muhsinking deleted the pod-plus-sls branch June 17, 2025 18:29
@muhsinking muhsinking restored the pod-plus-sls branch June 17, 2025 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant