Dockerfile.tpu 739 B

12345678910111213141516171819
  1. ARG NIGHTLY_DATE="20240601"
  2. ARG BASE_IMAGE="us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_$NIGHTLY_DATE"
  3. FROM $BASE_IMAGE
  4. WORKDIR /workspace
  5. COPY . /workspace/aphrodite-engine
  6. ENV APHRODITE_TARGET_DEVICE="tpu"
  7. # Install aiohttp separately to avoid build errors.
  8. RUN pip install aiohttp
  9. # Install the TPU and Pallas dependencies.
  10. RUN pip install torch_xla[tpu] -f https://storage.googleapis.com/libtpu-releases/index.html
  11. 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
  12. # Build Aphrodite.
  13. RUN cd /workspace/aphrodite-engine && python setup.py develop
  14. CMD ["/bin/bash"]