Skip to content

Commit

Permalink
chatbot-rag-app: removes unnecessary parts of Docker build
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Cole <[email protected]>
  • Loading branch information
codefromthecrypt committed Feb 25, 2025
1 parent d303541 commit e590639
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 38 deletions.
24 changes: 3 additions & 21 deletions example-apps/chatbot-rag-app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,11 @@ FROM python:3.12-slim
WORKDIR /app
RUN mkdir -p ./frontend/build
COPY --from=build-step ./app/frontend/build ./frontend/build
RUN mkdir ./api
RUN mkdir ./data

RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*


COPY requirements.txt ./requirements.txt
RUN pip3 install -r ./requirements.txt

RUN mkdir -p ./api ./data
COPY api ./api
COPY data ./data

Expand All @@ -32,15 +24,5 @@ EXPOSE 4000
# docker invocations to reenable.
ENV OTEL_SDK_DISABLED=true

# https://github.com/elastic/genai-instrumentation/issues/255
# Currently Python SDK has a bug that spams logs when opentelemetry-instrument is used
# with SDK being disabled. Until it is fixed, we handle it in our own entrypoint by
# avoiding opentelemetry-instrument when SDK is disabled.
RUN echo 'if [ "${OTEL_SDK_DISABLED:-true}" == "false" ]; \
then \
opentelemetry-instrument $@; \
else \
exec $@; \
fi' > entrypoint.sh
ENTRYPOINT [ "bash", "-eu", "./entrypoint.sh" ]
ENTRYPOINT [ "opentelemetry-instrument" ]
CMD [ "python", "api/app.py"]
37 changes: 20 additions & 17 deletions example-apps/chatbot-rag-app/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
aiohappyeyeballs==2.4.6
# via aiohttp
aiohttp==3.11.12
aiohttp==3.11.13
# via
# langchain
# langchain-community
Expand All @@ -22,15 +22,15 @@ attrs==25.1.0
# via aiohttp
blinker==1.9.0
# via flask
boto3==1.36.24
boto3==1.37.0
# via
# langchain-aws
# langtrace-python-sdk
botocore==1.36.24
botocore==1.37.0
# via
# boto3
# s3transfer
cachetools==5.5.1
cachetools==5.5.2
# via google-auth
certifi==2025.1.31
# via
Expand Down Expand Up @@ -80,7 +80,7 @@ flask==3.1.0
# via
# -r requirements.in
# flask-cors
flask-cors==5.0.0
flask-cors==5.0.1
# via -r requirements.in
frozenlist==1.5.0
# via
Expand Down Expand Up @@ -109,11 +109,11 @@ google-cloud-aiplatform==1.81.0
# via langchain-google-vertexai
google-cloud-bigquery==3.29.0
# via google-cloud-aiplatform
google-cloud-core==2.4.1
google-cloud-core==2.4.2
# via
# google-cloud-bigquery
# google-cloud-storage
google-cloud-resource-manager==1.14.0
google-cloud-resource-manager==1.14.1
# via google-cloud-aiplatform
google-cloud-storage==2.19.0
# via
Expand All @@ -127,7 +127,7 @@ google-resumable-media==2.7.2
# via
# google-cloud-bigquery
# google-cloud-storage
googleapis-common-protos[grpc]==1.67.0
googleapis-common-protos[grpc]==1.68.0
# via
# google-api-core
# grpc-google-iam-v1
Expand Down Expand Up @@ -164,7 +164,7 @@ httpx-sse==0.4.0
# langchain-community
# langchain-google-vertexai
# langchain-mistralai
huggingface-hub==0.29.0
huggingface-hub==0.29.1
# via
# tokenizers
# transformers
Expand Down Expand Up @@ -200,7 +200,7 @@ langchain-cohere==0.4.2
# via -r requirements.in
langchain-community==0.3.18
# via langchain-cohere
langchain-core==0.3.37
langchain-core==0.3.39
# via
# langchain
# langchain-aws
Expand All @@ -215,13 +215,13 @@ langchain-elasticsearch==0.3.2
# via -r requirements.in
langchain-google-vertexai==2.0.13
# via -r requirements.in
langchain-mistralai==0.2.6
langchain-mistralai==0.2.7
# via -r requirements.in
langchain-openai==0.3.6
langchain-openai==0.3.7
# via -r requirements.in
langchain-text-splitters==0.3.6
# via langchain
langsmith==0.3.8
langsmith==0.3.11
# via
# langchain
# langchain-community
Expand Down Expand Up @@ -250,7 +250,7 @@ numpy==2.2.3
# langchain-community
# shapely
# transformers
openai==1.63.2
openai==1.64.0
# via langchain-openai
opentelemetry-api==1.30.0
# via
Expand Down Expand Up @@ -323,11 +323,12 @@ packaging==24.2
# google-cloud-bigquery
# huggingface-hub
# langchain-core
# langsmith
# marshmallow
# opentelemetry-instrumentation
# opentelemetry-instrumentation-sqlalchemy
# transformers
propcache==0.2.1
propcache==0.3.0
# via
# aiohttp
# yarl
Expand Down Expand Up @@ -372,7 +373,7 @@ pydantic-core==2.27.2
# via
# cohere
# pydantic
pydantic-settings==2.7.1
pydantic-settings==2.8.0
# via langchain-community
python-dateutil==2.9.0.post0
# via
Expand Down Expand Up @@ -491,7 +492,9 @@ urllib3==2.3.0
# sentry-sdk
# types-requests
werkzeug==3.1.3
# via flask
# via
# flask
# flask-cors
wrapt==1.17.2
# via
# deprecated
Expand Down

0 comments on commit e590639

Please sign in to comment.