Skip to content

Commit

Permalink
Add gifs to serve
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsie011 committed Feb 29, 2024
1 parent fa45988 commit 35541e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion cerebrium/development/serve.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Testing with Hot-reload
title: Served sandbox with hot-reload
description: Use the `cerebrium serve` command to rapidly iterate on your code
---

Expand Down Expand Up @@ -30,6 +30,10 @@ Here are some additional commands that can be useful when working with `cerebriu

To stop a served instance, you can simply press `Ctrl+C` in the terminal where the server is running. This will gracefully shut down the server and terminate the served instance.


When a file changes in your served instance, we'll automatically sync the changes to the server and apply the changes!
![Example changing code with serve](/images/serve/ModifyingServeCode.gif)

### Testing inference on the served instance

#### Using the local REST server
Expand All @@ -45,6 +49,8 @@ Here is an example curl command:
curl -X POST http://localhost:8000/predict -H "Content-Type: application/json" --data '{"prompt": "this is my input data"}'
```

![Sending a prediction request to a serve instance using a curl](/images/serve/ServeCurl.gif)

Since we are using a local api server, you don't need to worry about providing an api key or any other authentication details.
Otherwise, you can interact with this endpoint as you would with a normal Cerebrium endpoint.
Your served instance will be running on port 8000 by default, however, you can change this by using the `--port` flag when you start a served instance
Expand Down
Binary file added images/serve/ModifyingServeCode.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/serve/ServeCurl.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"cerebrium/environments/using-secrets",
"cerebrium/environments/multi-gpu-inferencing",
"cerebrium/environments/warm-models",
"cerebrium/development/serve.mdx"
"cerebrium/development/serve"
]
},
{
Expand Down

0 comments on commit 35541e5

Please sign in to comment.