Dockerfile 1.4 KB

123456789101112131415161718192021222324
  1. # syntax=docker/dockerfile:1.7
  2. # SparkRing shared stack (FujitsuPolycom/sparkring) as a sm121-managed image.
  3. #
  4. # The public image is published digest-only (no tags), so a raw pull leaves an
  5. # untagged image that (a) sm121's image-presence probe cannot match by tag and
  6. # (b) `docker image prune` reaps as dangling. Wrapping it in a thin FROM with
  7. # a local tag puts it under the normal sm121 build/sync flow: built once on a
  8. # build node, `docker save | ssh docker load` to the rest, checksum-label
  9. # stamped, and safe from prune.
  10. #
  11. # No stages, no layers: the entire runtime lives upstream of the FROM.
  12. ARG BASE_IMAGE
  13. FROM ${BASE_IMAGE}
  14. LABEL sm121.source="ghcr.io/fujitsupolycom/sparkring" sm121.digest="sha256:f25cdb6bf7df85754ea5c62445b139dac3143bc6e910a0442d681b6e63c31c4b"
  15. # The b12x loader JIT-compiles _storage.c with `-L/opt/cuda-13.3/lib64 -lcudart`,
  16. # but this CUDA 13 image ships libcudart only as pip nvidia/cu13/lib/libcudart.so.13
  17. # (no lib64 dir, no dev symlink) — the first serve attempt dies with
  18. # "ld: cannot find -lcudart". Bridge it, then pre-build the extension so the
  19. # runtime cache is baked into the image and serves never hit the JIT.
  20. RUN set -eux; \
  21. mkdir -p /opt/cuda-13.3/lib64; \
  22. ln -s /usr/local/lib/python3.12/dist-packages/nvidia/cu13/lib/libcudart.so.13 /opt/cuda-13.3/lib64/libcudart.so; \
  23. python3 -c "import b12x.loader._native as n; n.load(); print('b12x loader native pre-built')"