Skip to content
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

custom server requirements.txt file generation added to the notebook #711

Merged
merged 3 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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