dockerfile.md 1.7 KB
Newer Older
1
2
# Dockerfile

3
We provide a <gh-file:docker/Dockerfile> to construct the image for running an OpenAI compatible server with vLLM.
4
More information about deploying with Docker can be found [here][deployment-docker].
5
6
7
8
9
10
11
12
13

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:

14
- `FROM ...` dependencies (with a solid line and a full arrow head)
15

16
- `COPY --from=...` dependencies (with a dashed line and an empty arrow head)
17

18
- `RUN --mount=(.\*)from=...` dependencies (with a dotted line and an empty diamond arrow head)
19

20
21
22
  > <figure markdown="span">
  >   ![](../../assets/contributing/dockerfile-stages-dependency.png){ align="center" alt="query" width="100%" }
  > </figure>
23
24
25
26
27
28
  >
  > 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):
  >
  > ```bash
29
  > dockerfilegraph -o png --legend --dpi 200 --max-label-length 50 --filename docker/Dockerfile
30
31
32
33
34
35
36
37
38
39
40
41
42
43
  > ```
  >
  > or in case you want to run it directly with the docker image:
  >
  > ```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 \
44
  >    --filename docker/Dockerfile \
45
46
47
48
  >    --legend
  > ```
  >
  > (To run it for a different file, you can pass in a different argument to the flag `--filename`.)