How to build vllm docker image for different CUDA version

The official vLLM Dockerfile is designed to support multiple CUDA versions by parameterizing the base image with the CUDA_VERSION build argument. However, successful builds depend on the availability of compatible CUDA base images and required packages (like ccache) for the specific Ubuntu/CUDA combination you choose. Your error (E: Unable to locate package ccache) is due to missing or outdated package lists, often caused by network issues or the chosen Ubuntu/CUDA image not having all expected packages in its repositories. This is not a limitation of vLLM’s Dockerfile design, but rather of the underlying image and network environment. See official vLLM Docker docs and related issues.

Would you like more detail on troubleshooting this specific error or on multi-CUDA support in vLLM Dockerfiles?

Sources: