Skip to content

Commit

Permalink
custom server requirements.txt file generation added to the notebook (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
saeid93 authored Sep 5, 2022
1 parent 1ee5d33 commit f4ba2b0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
29 changes: 27 additions & 2 deletions docs/examples/custom/README.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,26 @@
"With that goal in mind, the rough outline of steps will be to first build a custom image containing our code, and then deploy it.\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Specifying requirements\n",
"MLServer will automatically find your requirements.txt file and install necessary python packages"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%%writefile requirements.txt\n",
"numpy==1.22.0\n",
"numpyro==0.8.0\n",
"jax==0.2.24"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -467,7 +487,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3.8.10 64-bit",
"language": "python",
"name": "python3"
},
Expand All @@ -481,7 +501,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.8"
"version": "3.8.10"
},
"vscode": {
"interpreter": {
"hash": "e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a"
}
}
},
"nbformat": 4,
Expand Down
11 changes: 11 additions & 0 deletions docs/examples/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,17 @@ Now that we have written and tested our custom model, the next step is to deploy
With that goal in mind, the rough outline of steps will be to first build a custom image containing our code, and then deploy it.


### Specifying requirements
MLServer will automatically find your requirements.txt file and install necessary python packages


```python
%%writefile requirements.txt
numpy==1.22.0
numpyro==0.8.0
jax==0.2.24
```

### Building a custom image

```{note}
Expand Down

0 comments on commit f4ba2b0

Please sign in to comment.