Skip to content

Commit 88b087c

Browse files
committed
Simplify dockerfile
1 parent d19b80f commit 88b087c

File tree

2 files changed

+1
-9
lines changed
  • instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/langgraph-chatbot-demo

2 files changed

+1
-9
lines changed

instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/langgraph-chatbot-demo/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# TODO: Use `uv sync --script` once available https://github.com/astral-sh/uv/pull/11361
2-
31
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim AS build
42
RUN apt update && apt install -y git curl
53
WORKDIR /build
64
ARG GIT_REF
75
ENV SCRIPT_URL="https://raw.githubusercontent.com/aabmass/opentelemetry-python-contrib/${GIT_REF?must be set to a git commit}/instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/langgraph-chatbot-demo/run_streamlit.py"
86
# Creates the virtualenv
97
RUN curl -LO "${SCRIPT_URL}" && curl -LO "${SCRIPT_URL}.lock"
10-
RUN uv venv venv && uv export --script run_streamlit.py | uv pip sync -p venv -
8+
RUN VIRTUAL_ENV=./venv uv sync --active --frozen --script run_streamlit.py
119

1210
FROM python:3.13-slim
1311
WORKDIR /build

instrumentation-genai/opentelemetry-instrumentation-vertexai/examples/langgraph-chatbot-demo/src/langgraph_chatbot_demo/run_streamlit.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import importlib.util
22
import os
33
import subprocess
4-
import sys
54

65
import google.auth
76
import google.auth.transport
@@ -14,11 +13,6 @@ def setenv_default(k: str, v: str) -> None:
1413

1514

1615
def run_streamlit() -> None:
17-
# This is used to populate uv cache in docker build without actually running the script
18-
if os.environ.get("DRY_RUN"):
19-
print("Just exit")
20-
sys.exit(0)
21-
2216
creds, project_id = google.auth.default()
2317
creds.refresh(google.auth.transport.requests.Request())
2418

0 commit comments

Comments
 (0)