Create a virtual environment
Activate the virtual environment
Install the Runpod SDK
rp_handler.py
and add the following code:
prompt
string contained in the input
object. You can replace the time.sleep(seconds)
call with your own Python code for generating images, text, or running any machine learning workload.
test_input.json
and add the following code:
Dockerfile
with the following content:
Build your Docker image
[YOUR_USERNAME]
with your Docker username:Push the image to your container registry
docker.io/yourusername/serverless-test:latest
./run
and /status
.