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

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
19
20
# Remove existing versions of dependencies
RUN pip uninstall -y torch torch_xla torchvision

21
ENV VLLM_TARGET_DEVICE="tpu"
22
23
24
RUN --mount=type=cache,target=/root/.cache/pip \
    --mount=type=bind,source=.git,target=.git \
    python3 -m pip install \
25
        -r requirements/tpu.txt
26
RUN python3 -m pip install -e .
27

youkaichao's avatar
youkaichao committed
28
29
30
# install development dependencies (for testing)
RUN python3 -m pip install -e tests/vllm_test_utils

31
CMD ["/bin/bash"]