Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,27 @@ jobs:
mise run helm -- dependencies
mise exec -- uv run --frozen --project . --no-sync pytest -q -m docker tools/ci/tests/test_collector_*privacy.py

bundle-resolution:
name: CI / Bundle resolution
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 45
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
with:
persist-credentials: false
- uses: jdx/mise-action@c37c93293d6b742fc901e1406b8f764f6fb19dac # v2
with:
version: 2026.5.5
install_args: --jobs=1
cache: false
- run: mise run sync
- name: Resolve release bundle constraints
env:
SIE_RUN_IMAGE_RESOLUTION: "1"
run: >-
mise exec -- uv run --frozen --project . --no-sync pytest -q
packages/sie_server/tests/core/test_bundle_image_resolution.py

typescript:
name: CI / TypeScript
runs-on: blacksmith-4vcpu-ubuntu-2404
Expand Down Expand Up @@ -292,7 +313,7 @@ jobs:
required:
name: CI / Required
if: ${{ always() }}
needs: [policy, bootstrap, python, typescript, rust, contracts, helm, live-sdk, cpu-stack, python-distributions, npm-distributions]
needs: [policy, bootstrap, python, bundle-resolution, typescript, rust, contracts, helm, live-sdk, cpu-stack, python-distributions, npm-distributions]
runs-on: blacksmith-2vcpu-ubuntu-2404
timeout-minutes: 5
steps:
Expand Down
15 changes: 13 additions & 2 deletions packages/sie_server/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,20 @@ FROM base AS builder

ARG BUNDLE

# Ranged bundle deps are constrained to uv.lock. Exact pins and URL/VCS specs stay overrides.
COPY uv.lock /tmp/uv.lock

RUN .venv/bin/python -m sie_server.cli resolve-deps \
--bundle "${BUNDLE}" \
--models-dir models \
--cpu \
--lock /tmp/uv.lock \
--constraints-output /tmp/bundle-constraints.txt \
> /tmp/bundle-requirements.txt \
&& echo "Bundle ${BUNDLE} requirements:" \
&& cat /tmp/bundle-requirements.txt
&& cat /tmp/bundle-requirements.txt \
&& echo "Bundle ${BUNDLE} lock constraints:" \
&& cat /tmp/bundle-constraints.txt

# Bundle-specific deps land in a separate site-packages tree so the shared
# venv layer stays byte-identical across bundles of the same platform.
Expand All @@ -149,6 +156,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
--extra-index-url https://pypi.org/simple \
--target=/app/bundle-libs \
--no-compile \
-c /tmp/bundle-constraints.txt \
-r /tmp/bundle-requirements.txt; \
fi

Expand All @@ -163,7 +171,9 @@ RUN set -eux; \
rm -rf torch/test torch/utils/tensorboard torch/utils/bottleneck 2>/dev/null || true; \
find torch -type f -name '*.a' -delete 2>/dev/null || true; \
fi; \
find /app/bundle-libs -exec touch -h -d @0 {} + 2>/dev/null || true
find /app/bundle-libs -exec touch -h -d @0 {} + 2>/dev/null || true; \
/app/.venv/bin/pip freeze --path /app/bundle-libs > /app/bundle-libs-freeze.txt; \
touch -d @0 /app/bundle-libs-freeze.txt

# =============================================================================
# Runtime image
Expand Down Expand Up @@ -220,6 +230,7 @@ COPY --link --from=base --chown=1000:1000 /app/models /app/models
COPY --link --from=base --chown=1000:1000 /app/bundles /app/bundles
# Bundle-specific extras — last layer so shared layers above stay cached.
COPY --link --from=builder --chown=1000:1000 /app/bundle-libs /app/bundle-libs
COPY --link --from=builder --chown=1000:1000 /app/bundle-libs-freeze.txt /app/bundle-libs-freeze.txt

RUN mkdir -p /app/evals /app/.cache/huggingface /app/.cache/sie && chown -R sie:sie /app/evals /app/.cache \
&& chmod 700 /app/.cache/sie
Expand Down
16 changes: 14 additions & 2 deletions packages/sie_server/Dockerfile.cuda12
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,19 @@ FROM base AS builder

ARG BUNDLE

# Ranged bundle deps are constrained to uv.lock. Exact pins and URL/VCS specs stay overrides.
COPY uv.lock /tmp/uv.lock

RUN .venv/bin/python -m sie_server.cli resolve-deps \
--bundle "${BUNDLE}" \
--models-dir models \
--lock /tmp/uv.lock \
--constraints-output /tmp/bundle-constraints.txt \
> /tmp/bundle-requirements.txt \
&& echo "Bundle ${BUNDLE} requirements:" \
&& cat /tmp/bundle-requirements.txt
&& cat /tmp/bundle-requirements.txt \
&& echo "Bundle ${BUNDLE} lock constraints:" \
&& cat /tmp/bundle-constraints.txt

# Bundle-specific deps go into a separate site-packages tree (``bundle-libs``,
# prepended to sys.path via a .pth) so the shared venv layer stays
Expand All @@ -177,11 +184,13 @@ RUN --mount=type=cache,target=/root/.cache/pip \
--target=/app/bundle-libs \
--no-compile \
--extra-index-url https://docs.sglang.ai/whl/cu129/ \
-c /tmp/bundle-constraints.txt \
-r /tmp/bundle-requirements.txt ;; \
*) \
.venv/bin/pip install \
--target=/app/bundle-libs \
--no-compile \
-c /tmp/bundle-constraints.txt \
-r /tmp/bundle-requirements.txt ;; \
esac; \
fi
Expand All @@ -201,7 +210,9 @@ RUN set -eux; \
find nvidia -type f -name '*.a' -delete 2>/dev/null || true; \
fi; \
# Normalize mtimes so rebuilds of the same bundle produce identical layer bytes.
find /app/bundle-libs -exec touch -h -d @0 {} + 2>/dev/null || true
find /app/bundle-libs -exec touch -h -d @0 {} + 2>/dev/null || true; \
/app/.venv/bin/pip freeze --path /app/bundle-libs > /app/bundle-libs-freeze.txt; \
touch -d @0 /app/bundle-libs-freeze.txt

# =============================================================================
# Runtime image
Expand Down Expand Up @@ -307,6 +318,7 @@ COPY --link --from=base --chown=1000:1000 /app/bundles /app/bundles
# Bundle-specific extras — last layer so shared layers above stay cached.
# A `.pth` file in the shared venv puts /app/bundle-libs at sys.path[0] at startup.
COPY --link --from=builder --chown=1000:1000 /app/bundle-libs /app/bundle-libs
COPY --link --from=builder --chown=1000:1000 /app/bundle-libs-freeze.txt /app/bundle-libs-freeze.txt

RUN mkdir -p /app/evals /app/.cache/huggingface /app/.cache/sie-kernels /app/.cache/sie \
&& chown -R sie:sie /app/evals /app/.cache \
Expand Down
15 changes: 13 additions & 2 deletions packages/sie_server/Dockerfile.cuda13
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,19 @@ FROM base AS builder

ARG BUNDLE

# Ranged bundle deps are constrained to uv.lock. Exact pins and URL/VCS specs stay overrides.
COPY uv.lock /tmp/uv.lock

RUN .venv/bin/python -m sie_server.cli resolve-deps \
--bundle "${BUNDLE}" \
--models-dir models \
--lock /tmp/uv.lock \
--constraints-output /tmp/bundle-constraints.txt \
> /tmp/bundle-requirements.txt \
&& echo "Bundle ${BUNDLE} requirements:" \
&& cat /tmp/bundle-requirements.txt
&& cat /tmp/bundle-requirements.txt \
&& echo "Bundle ${BUNDLE} lock constraints:" \
&& cat /tmp/bundle-constraints.txt

# cu130 bundle deps go into a separate site-packages tree (``bundle-libs``,
# prepended to sys.path via the .pth above). CUDA 13 engines need torch 2.11
Expand Down Expand Up @@ -191,6 +198,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
--prerelease=allow \
--extra-index-url https://download.pytorch.org/whl/cu130 \
--extra-index-url https://docs.sglang.ai/whl/cu130/ \
--constraint /tmp/bundle-constraints.txt \
-r /tmp/bundle-requirements.txt ; \
fi

Expand All @@ -206,7 +214,9 @@ RUN set -eux; \
find torch -type f -name '*.a' -delete 2>/dev/null || true; \
find nvidia -type f -name '*.a' -delete 2>/dev/null || true; \
fi; \
find /app/bundle-libs -exec touch -h -d @0 {} + 2>/dev/null || true
find /app/bundle-libs -exec touch -h -d @0 {} + 2>/dev/null || true; \
/app/.venv/bin/pip freeze --path /app/bundle-libs > /app/bundle-libs-freeze.txt; \
touch -d @0 /app/bundle-libs-freeze.txt

# =============================================================================
# Runtime image (CUDA 13 devel — nvcc for flashinfer/tvm_ffi first-decode JIT)
Expand Down Expand Up @@ -272,6 +282,7 @@ COPY --link --from=base --chown=1000:1000 /app/models /app/models
COPY --link --from=base --chown=1000:1000 /app/bundles /app/bundles
# Bundle-specific extras — last layer so shared layers above stay cached.
COPY --link --from=builder --chown=1000:1000 /app/bundle-libs /app/bundle-libs
COPY --link --from=builder --chown=1000:1000 /app/bundle-libs-freeze.txt /app/bundle-libs-freeze.txt

RUN mkdir -p /app/evals /app/.cache/huggingface /app/.cache/sie-kernels /app/.cache/sie \
&& chown -R sie:sie /app/evals /app/.cache \
Expand Down
Loading
Loading