forked from novitalabs/pegaflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 1.11 KB
/
Copy pathDockerfile
File metadata and controls
41 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Lightweight image: vLLM OpenAI base + pegaflow built from source (release).
FROM vllm/vllm-openai:latest AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Build dependencies for pegaflow (Rust toolchain, proto, Python headers)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
clang \
curl \
git \
libssl-dev \
pkg-config \
protobuf-compiler \
python3-dev \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install Rust toolchain and maturin for wheel build
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable \
&& . "$HOME/.cargo/env" \
&& rustup component add clippy rustfmt \
&& python3 -m pip install --no-cache-dir maturin
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /workspace/pegaflow
COPY . .
# Build release wheel and stage it for the runtime image
RUN ./scripts/build-wheel.sh --release \
&& cp target/wheels/pegaflow-*.whl /tmp/
FROM vllm/vllm-openai:latest
COPY --from=builder /tmp/pegaflow-*.whl /tmp/
RUN python3 -m pip install --no-cache-dir /tmp/pegaflow-*.whl \
&& rm /tmp/pegaflow-*.whl
WORKDIR /workspace