Skip to content

Commit acb14d5

Browse files
authored
docs: Update example service (#129)
1 parent 940ab72 commit acb14d5

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

examples/ml_prediction_service/Dockerfile

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@
44
# docker run -it --rm -p 8000:8000 prediction-example
55
# Test:
66
# curl 'localhost:8000/predict?number=10'
7-
# Load test with github.com/codesenberg/bombardier:
8-
# bombardier -c 25 -r 300 -d 10s -l 'localhost:8000/predict?number=5'
7+
#
8+
# Simple load test with https://github.com/hatoo/oha:
9+
# oha -c 25 -q 300 -n 2000 'http://localhost:8000/predict?number=5'
910

10-
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
11+
FROM python:3.13-slim
1112

12-
RUN pip install dike numpy
13+
RUN pip install --no-cache-dir dike numpy fastapi uvicorn
1314
COPY api.py /app/api.py
1415

16+
USER 1000
1517
EXPOSE 8000
18+
WORKDIR /app
19+
1620
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "8000"]

0 commit comments

Comments
 (0)