Skip to content

Latest commit

 

History

History

1-websockets

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Cerebrium Websockets Example (BETA)

This example demonstrates how to deploy a Cerebrium app that makes use of websockets.

Warning: This functionality is in beta and may change in the future.

Required changes

[cerebrium.runtime.custom]
port = 5000
entrypoint = "uvicorn main:app --host 0.0.0.0 --port 5000"
healthcheck_endpoint = "/health"

Things to note

  • The custom runtime is required
  • Requests need to be made to wss://...

Making a request

websocat wss://api.cortex.cerebrium.ai/v4/<your-project-id>/<your-app-name>/<your-websocket-function-name>