Skip to content

Commit

Permalink
feat: FastAPI Docker Image Port
Browse files Browse the repository at this point in the history
  • Loading branch information
zzsza committed Feb 9, 2024
1 parent 8592c92 commit 554d006
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 02-online-serving(fastapi)/projects/web_single/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ WORKDIR /code
COPY --from=requirements-stage /tmp/requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY . /code
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
6 changes: 6 additions & 0 deletions 02-online-serving(fastapi)/projects/web_single/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ curl "http://0.0.0.0:8000/predict/1"
docker build -t web_single_example .
```

## Docker Run
```
docker run -p 8000:8000 web_single_example
```


---


Expand Down

0 comments on commit 554d006

Please sign in to comment.