-
Notifications
You must be signed in to change notification settings - Fork 204
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
docs: dockerize manual instrumentation example #2797
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one!
FROM python:3.11-slim as builder | ||
WORKDIR /app | ||
COPY requirements.txt /app/ | ||
RUN pip install uv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually speed up things??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uv
is definitely faster, although the reason I chose it here is to use uv pip sync
, which guarantees that we are installing the exact versions of the packages pinned in requirements.txt
. pip install
does not provide any guarantees here.
ruff check --fix . && ruff format . | ||
|
||
typecheck: | ||
pyright . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kinda curious why you chose pyright here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arbitrary choice. I can switch to mypy
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pyright
is faster, though.
docker build -t chat-service . | ||
|
||
docker-run: | ||
docker run -e "OPENAI_API_KEY=$OPENAI_API_KEY" -p 8000:8000 -it chat-service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the env variable get mounted anyways?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, I don't believe it does.
get_openapi( | ||
title="Chat Service Schema", | ||
version="1.0.0", | ||
description="Your API Description", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should fill this out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed in 8752d4f
Dockerizes manual instrumentation example so someone can spin it up and try it out in a single command.
resolves #2798