mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-13 15:55:48 +08:00
[Doc] add visualization for multi-stage dockerfile (#4456)
Signed-off-by: Prashant Gupta <prashantgupta@us.ibm.com> Co-authored-by: Roger Wang <ywang@roblox.com>
This commit is contained in:
parent
4bb53e2dde
commit
b31a1fb63c
@ -1,6 +1,10 @@
|
|||||||
# The vLLM Dockerfile is used to construct vLLM image that can be directly used
|
# The vLLM Dockerfile is used to construct vLLM image that can be directly used
|
||||||
# to run the OpenAI compatible server.
|
# to run the OpenAI compatible server.
|
||||||
|
|
||||||
|
# Please update any changes made here to
|
||||||
|
# docs/source/dev/dockerfile/dockerfile.rst and
|
||||||
|
# docs/source/assets/dev/dockerfile-stages-dependency.png
|
||||||
|
|
||||||
#################### BASE BUILD IMAGE ####################
|
#################### BASE BUILD IMAGE ####################
|
||||||
# prepare basic build environment
|
# prepare basic build environment
|
||||||
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS dev
|
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04 AS dev
|
||||||
|
|||||||
BIN
docs/source/assets/dev/dockerfile-stages-dependency.png
Normal file
BIN
docs/source/assets/dev/dockerfile-stages-dependency.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 115 KiB |
50
docs/source/dev/dockerfile/dockerfile.rst
Normal file
50
docs/source/dev/dockerfile/dockerfile.rst
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
Dockerfile
|
||||||
|
====================
|
||||||
|
|
||||||
|
See `here <https://github.com/vllm-project/vllm/blob/main/Dockerfile>`_ for the main Dockerfile to construct
|
||||||
|
the image for running an OpenAI compatible server with vLLM.
|
||||||
|
|
||||||
|
- Below is a visual representation of the multi-stage Dockerfile. The build graph contains the following nodes:
|
||||||
|
|
||||||
|
- All build stages
|
||||||
|
- The default build target (highlighted in grey)
|
||||||
|
- External images (with dashed borders)
|
||||||
|
|
||||||
|
The edges of the build graph represent:
|
||||||
|
|
||||||
|
- FROM ... dependencies (with a solid line and a full arrow head)
|
||||||
|
- COPY --from=... dependencies (with a dashed line and an empty arrow head)
|
||||||
|
- RUN --mount=(.*)from=... dependencies (with a dotted line and an empty diamond arrow head)
|
||||||
|
|
||||||
|
.. figure:: ../../assets/dev/dockerfile-stages-dependency.png
|
||||||
|
:alt: query
|
||||||
|
:width: 100%
|
||||||
|
:align: center
|
||||||
|
|
||||||
|
Made using: https://github.com/patrickhoefler/dockerfilegraph
|
||||||
|
|
||||||
|
Commands to regenerate the build graph (make sure to run it **from the `root` directory of the vLLM repository** where the dockerfile is present):
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
dockerfilegraph -o png --legend --dpi 200 --max-label-length 50 --filename Dockerfile
|
||||||
|
|
||||||
|
or in case you want to run it directly with the docker image:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
--rm \
|
||||||
|
--user "$(id -u):$(id -g)" \
|
||||||
|
--workdir /workspace \
|
||||||
|
--volume "$(pwd)":/workspace \
|
||||||
|
ghcr.io/patrickhoefler/dockerfilegraph:alpine \
|
||||||
|
--output png \
|
||||||
|
--dpi 200 \
|
||||||
|
--max-label-length 50 \
|
||||||
|
--filename Dockerfile \
|
||||||
|
--legend
|
||||||
|
|
||||||
|
(To run it for a different file, you can pass in a different argument to the flag `--filename`.)
|
||||||
|
|
||||||
|
|
||||||
@ -102,6 +102,7 @@ Documentation
|
|||||||
dev/sampling_params
|
dev/sampling_params
|
||||||
dev/engine/engine_index
|
dev/engine/engine_index
|
||||||
dev/kernel/paged_attention
|
dev/kernel/paged_attention
|
||||||
|
dev/dockerfile/dockerfile
|
||||||
|
|
||||||
Indices and tables
|
Indices and tables
|
||||||
==================
|
==================
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user