# vLLM CPU Base (AVX2)

> vLLM CPU build for x86_64 hosts with AVX2 (Advanced Vector Extensions 2) but no AVX-512 (Advanced Vector Extensions 512), used as the base of benchmark-vllm-cpu-avx2.

Source: [`images/vllm-cpu-base-avx2/`](https://github.com/SpareCores/sc-images/tree/main/images/vllm-cpu-base-avx2) in the `sc-images` repository. Image: [`ghcr.io/sparecores/vllm-cpu-base-avx2:main`](https://github.com/orgs/SpareCores/packages/container/package/vllm-cpu-base-avx2).

amd64 vLLM `vllm-openai` CPU image built with **`VLLM_CPU_AVX2=true`** for hosts that have AVX2 (Advanced Vector Extensions 2) but not AVX-512 (Advanced Vector Extensions 512).

Hub `vllm/vllm-openai-cpu` amd64 targets AVX-512; [`benchmark-vllm-cpu-avx2`](https://docs.sparecores.com/images/benchmark-vllm-cpu-avx2.md) uses this base.

Published as `ghcr.io/sparecores/vllm-cpu-base-avx2:main` (amd64 only). The folder's [`prepare.sh`](https://github.com/SpareCores/sc-images/blob/main/images/vllm-cpu-base-avx2/prepare.sh) hook clones the pinned source, sizes compile parallelism on physical RAM, and patches `docker/Dockerfile.cpu`; the [build framework](https://docs.sparecores.com/images/contributors.md) builds it on `linux/amd64`. Version pin: [`VLLM_VERSION`](https://github.com/SpareCores/sc-images/blob/main/vllm-common/VLLM_VERSION).

CI exports layer cache to GitHub Actions cache (`type=gha`, scope `vllm-cpu-base-avx2-amd64-v{VLLM_VERSION}`) and GHCR (GitHub Container Registry), as `buildcache-amd64`. The first successful build populates both; reruns on the same runner class should restore GHA cache quickly. If `buildcache-amd64` does not exist yet, registry import is skipped and the build still runs ([registry cache docs](https://docs.docker.com/build/cache/backends/registry/)).
