From f158e005ec9be742a0ad250b6a93e75d7c18b206 Mon Sep 17 00:00:00 2001 From: sauagarwa Date: Wed, 11 Mar 2026 12:14:13 -0400 Subject: [PATCH 1/2] fix: preinstall UI deps and relax startup probes Move dependency installation to image build time and tune probe timing to avoid CrashLoopBackOff during cold starts. Made-with: Cursor --- deploy/helm/rag/values.yaml | 6 +++++- frontend/Containerfile | 27 ++++++++++++--------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/deploy/helm/rag/values.yaml b/deploy/helm/rag/values.yaml index 889f4e05..cba540d6 100644 --- a/deploy/helm/rag/values.yaml +++ b/deploy/helm/rag/values.yaml @@ -3,7 +3,7 @@ replicaCount: 1 image: repository: quay.io/rh-ai-quickstart/llamastack-dist-ui pullPolicy: Always - tag: 0.2.33 + tag: latest-dev service: type: ClusterIP @@ -16,11 +16,15 @@ livenessProbe: httpGet: path: / port: http + initialDelaySeconds: 60 + timeoutSeconds: 15 readinessProbe: httpGet: path: / port: http + initialDelaySeconds: 30 + timeoutSeconds: 15 env: - name: LLAMA_STACK_ENDPOINT diff --git a/frontend/Containerfile b/frontend/Containerfile index 64c032cd..406f760b 100644 --- a/frontend/Containerfile +++ b/frontend/Containerfile @@ -5,30 +5,27 @@ FROM python:3.12-slim WORKDIR /app -# Install uv first (rarely changes) -RUN pip install uv +# Install only runtime dependencies at build time. +ENV PIP_NO_CACHE_DIR=1 \ + PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 -# Copy dependency file first (for better caching) +# Copy dependency metadata first for better layer caching. COPY pyproject.toml ./ -# Install dependencies only (cached unless pyproject.toml changes) -RUN uv pip install --system -r pyproject.toml +# Install dependencies into system site-packages during build. +RUN pip install --no-cache-dir uv && \ + uv pip install --system -r pyproject.toml && \ + pip uninstall -y uv && \ + rm -rf /root/.cache/uv /root/.cache/pip -# Copy application code (invalidates cache only on code changes) +# Copy the rest of the application source. COPY . /app/ -# Set UV cache directory to a writable location -ENV UV_CACHE_DIR=/app/.uv-cache -ENV XDG_CACHE_HOME=/app/.cache - -# Create cache directories with proper permissions -RUN mkdir -p /app/.uv-cache /app/.cache && \ - chmod -R 777 /app/.uv-cache /app/.cache - # Ensure all app files have proper ownership and permissions for non-root users RUN chown -R 1001:0 /app && \ chmod -R g+rwX /app EXPOSE 8501 -ENTRYPOINT ["uv", "run", "streamlit", "run", "/app/llama_stack_ui/distribution/ui/app.py", "--server.port=8501", "--server.address=0.0.0.0"] +ENTRYPOINT ["python", "-m", "streamlit", "run", "/app/llama_stack_ui/distribution/ui/app.py", "--server.port=8501", "--server.address=0.0.0.0"] From 2d2526b5ca43166f4a923b907d98fdb1ac521e51 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 11 Mar 2026 16:22:22 +0000 Subject: [PATCH 2/2] chore: bump version to 0.2.35 --- deploy/helm/rag/Chart.yaml | 4 ++-- deploy/helm/rag/values.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/deploy/helm/rag/Chart.yaml b/deploy/helm/rag/Chart.yaml index 52394360..3a47b482 100644 --- a/deploy/helm/rag/Chart.yaml +++ b/deploy/helm/rag/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rag description: A Helm chart for Kubernetes type: application -version: 0.2.33 -appVersion: "0.2.33" +version: 0.2.35 +appVersion: "0.2.35" dependencies: - name: pgvector diff --git a/deploy/helm/rag/values.yaml b/deploy/helm/rag/values.yaml index cba540d6..2d763d8e 100644 --- a/deploy/helm/rag/values.yaml +++ b/deploy/helm/rag/values.yaml @@ -3,7 +3,7 @@ replicaCount: 1 image: repository: quay.io/rh-ai-quickstart/llamastack-dist-ui pullPolicy: Always - tag: latest-dev + tag: 0.2.35 service: type: ClusterIP