Skip to content

Commit

Permalink
♻️ move build stage up
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Gupta <[email protected]>
  • Loading branch information
prashantgupta24 committed Apr 23, 2024
1 parent d155de8 commit eec7a7b
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ RUN --mount=type=cache,target=/root/.cache/pip \
-r requirements-cuda.txt \
-r requirements-dev.txt

## Proto Compilation ###########################################################
FROM python-base AS gen-protos

RUN microdnf install -y \
make \
findutils \
&& microdnf clean all

RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=Makefile,target=Makefile \
--mount=type=bind,source=proto,target=proto \
make gen-protos

## Builder #####################################################################
FROM dev AS build
Expand Down Expand Up @@ -243,19 +255,6 @@ WORKDIR /usr/src/flash-attention-v2
RUN pip --verbose wheel flash-attn==${FLASH_ATTN_VERSION} \
--no-build-isolation --no-deps --no-cache-dir

## Proto Compilation ###########################################################
FROM python-base AS gen-protos

RUN microdnf install -y \
make \
findutils \
&& microdnf clean all

RUN --mount=type=cache,target=/root/.cache/pip \
--mount=type=bind,source=Makefile,target=Makefile \
--mount=type=bind,source=proto,target=proto \
make gen-protos

## vLLM installation IMAGE ##########################################################
# image with vLLM installed
FROM dev AS vllm
Expand Down

0 comments on commit eec7a7b

Please sign in to comment.