forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doc] add visualization for multi-stage dockerfile (vllm-project#4456)
Signed-off-by: Prashant Gupta <[email protected]> Co-authored-by: Roger Wang <[email protected]>
- Loading branch information
1 parent
4bb53e2
commit b31a1fb
Showing
4 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`.) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters