Dockerfile.tpu 830 Bytes
Newer Older
1
ARG NIGHTLY_DATE="20240726"
2
3
4
5
6
7
8
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 aiohttp separately to avoid build errors.
RUN pip install aiohttp
9
10
# Install NumPy 1 instead of NumPy 2.
RUN pip install "numpy<2"
11
12
13
14
# Install the TPU and Pallas dependencies.
RUN pip install torch_xla[tpu] -f https://storage.googleapis.com/libtpu-releases/index.html
RUN 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

15
16
17
# Fix FastAPI dependence
RUN pip install "starlette<0.38.0"

18
# Build vLLM.
19
20
COPY . /workspace/vllm
ENV VLLM_TARGET_DEVICE="tpu"
21
22
23
RUN cd /workspace/vllm && python setup.py develop

CMD ["/bin/bash"]