Skip to content

Commit 2ceb847

Browse files
authored
update docs (#105)
* update docs * fixes
1 parent d7dd9eb commit 2ceb847

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/guides/custom_docker_images.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ subsequent versions of this document will have native examples for non-Python bi
1515
For choice of web server, we recommend [FastAPI](https://fastapi.tiangolo.com/lo/) due to its speed and ergonomics.
1616
Any web server would work, although we give examples with FastAPI.
1717

18-
## Step 1: Install FastAPI
18+
## Step 1: Install Requirements
1919

20-
You can add `fastapi` to the `requirements.txt` file that gets installed as part of your Dockerfile. Alternatively,
21-
you can add `pip install fastapi` to the Dockerfile directly.
20+
You can add `fastapi` and `uvicorn` to the `requirements.txt` file that gets installed as part of your Dockerfile. Alternatively,
21+
you can add `pip install fastapi uvicorn` to the Dockerfile directly.
2222

2323
## Step 2: Set up a web server application
2424

@@ -62,7 +62,7 @@ using AWS ECR, please make sure that the necessary cross-account permissions all
6262

6363
## Step 4: Deploy!
6464

65-
Now you can upload your docker image as a Model Bundle, and then create a Model Endpoint referencing that Model Bundle.
65+
Now you can upload your docker image as a Model Bundle, and then create a Model Endpoint referencing that Model Bundle. Note that `path.to.your.server.file:app` in the `command` section below should be relative to the `WORKDIR` of your docker image.
6666

6767

6868
```py
@@ -87,7 +87,7 @@ client.create_model_bundle_from_runnable_image_v2(
8787
"dumb-init",
8888
"--",
8989
"uvicorn",
90-
"/path/in/docker/image/to/server.py",
90+
"path.to.your.server.file:app",
9191
"--port",
9292
"5005",
9393
"--host",
@@ -106,7 +106,7 @@ client.create_model_endpoint(
106106
per_worker=1,
107107
memory="30Gi",
108108
storage="40Gi",
109-
cpus=4,
109+
cpus=4, # This must be at least 2 because forwarding services consume 1 cpu.
110110
gpus=1,
111111
gpu_type="nvidia-ampere-a10",
112112
update_if_exists=True,

0 commit comments

Comments
 (0)