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

FROM $BASE_IMAGE
WORKDIR /workspace

# Install the TPU and Pallas dependencies.
Woosuk Kwon's avatar
Woosuk Kwon committed
8
9
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
10

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

CMD ["/bin/bash"]