:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(ci): bake llm-analytics model before the source copy (#82864)
posthog[bot]64f705dea6a7
diff --git a/.github/workflows/cd-llm-analytics-image.yml b/.github/workflows/cd-llm-analytics-image.ymlindex 10ea57346c7a..78ce5ae39a47 100644--- a/.github/workflows/cd-llm-analytics-image.yml+++ b/.github/workflows/cd-llm-analytics-image.yml@@ -78,12 +78,6 @@ jobs:with:fetch-depth: 2- - name: Set up Docker Buildx- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0-- - name: Set up QEMU- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0-- name: Set up Depot CLIuses: depot/setup-action@15c09a5f77a0840ad4bce955686522a257853461 # v1.7.1diff --git a/Dockerfile.llm-analytics b/Dockerfile.llm-analyticsindex 7afcdf715c11..376fe6d2e90d 100644--- a/Dockerfile.llm-analytics+++ b/Dockerfile.llm-analytics@@ -51,16 +51,6 @@ RUN --mount=type=cache,id=uv-libxmlsec1.2.37-2,target=/root/.cache/uv \--mount=type=bind,source=tools/owners,target=tools/owners \uv sync --locked --no-dev --no-editable --no-install-project --group sentiment --no-binary-package lxml --no-binary-package xmlsec-# Copy project files-COPY manage.py manage.py-COPY common/esbuilder common/esbuilder-COPY common/hogvm common/hogvm/-COPY common/migration_utils common/migration_utils/-COPY posthog posthog/-COPY products/ products/-COPY ee ee/-COPY bin/temporal-django-worker bin/temporal-django-worker-ENV PATH=/python-runtime/bin:$PATH \PYTHONPATH=/python-runtime \POSTHOG_SENTIMENT_MODEL_CACHE=/opt/posthog-sentiment-model \@@ -140,6 +130,17 @@ print(f'Model baked into {cache_dir}')"BAKE_MODEL+# Copy project files. Must stay below the tiktoken pre-warm and the model bake, which read+# nothing from the repo; moving it above them invalidates both layers on every source-only commit.+COPY manage.py manage.py+COPY common/esbuilder common/esbuilder+COPY common/hogvm common/hogvm/+COPY common/migration_utils common/migration_utils/+COPY posthog posthog/+COPY products/ products/+COPY ee ee/+COPY bin/temporal-django-worker bin/temporal-django-worker+RUN chmod +x bin/temporal-django-workerCMD ["bin/temporal-django-worker"]