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

FROM $BASE_IMAGE
WORKDIR /workspace

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

10
# Install the TPU and Pallas dependencies.
Woosuk Kwon's avatar
Woosuk Kwon committed
11
12
RUN python3 -m pip install torch_xla[tpu] -f https://storage.googleapis.com/libtpu-releases/index.html
RUN python3 -m pip install torch_xla[pallas] -f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html -f https://storage.googleapis.com/jax-releases/jaxlib_nightly_releases.html
13

14
# Build vLLM.
15
16
COPY . /workspace/vllm
ENV VLLM_TARGET_DEVICE="tpu"
Woosuk Kwon's avatar
Woosuk Kwon committed
17
18
RUN cd /workspace/vllm && python3 -m pip install -r requirements-tpu.txt
RUN cd /workspace/vllm && python3 setup.py develop
19
20

CMD ["/bin/bash"]