Dockerfile.tpu 798 Bytes
Newer Older
1
ARG NIGHTLY_DATE="20241017"
2
3
4
ARG BASE_IMAGE="us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_$NIGHTLY_DATE"

FROM $BASE_IMAGE
5
WORKDIR /workspace/vllm
6

7
# Install some basic utilities
8
9
10
RUN apt-get update && apt-get install -y \
    git \
    ffmpeg libsm6 libxext6 libgl1
11

12
# Build vLLM.
13
14
15
16
17
COPY . .
ARG GIT_REPO_CHECK=0
RUN --mount=type=bind,source=.git,target=.git \
    if [ "$GIT_REPO_CHECK" != 0 ]; then bash tools/check_repo.sh; fi

18
ENV VLLM_TARGET_DEVICE="tpu"
19
20
21
22
RUN --mount=type=cache,target=/root/.cache/pip \
    --mount=type=bind,source=.git,target=.git \
    python3 -m pip install \
        -r requirements-tpu.txt
23
RUN python3 setup.py develop
24

youkaichao's avatar
youkaichao committed
25
26
27
# install development dependencies (for testing)
RUN python3 -m pip install -e tests/vllm_test_utils

28
CMD ["/bin/bash"]