Dockerfile.tpu 947 B

1234567891011121314151617181920212223
  1. ARG NIGHTLY_DATE="20240726"
  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. # Install the TPU and Pallas dependencies.
  6. RUN python3 -m pip install torch_xla[tpu] -f https://storage.googleapis.com/libtpu-releases/index.html
  7. 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
  8. # Build Aphrodite.
  9. COPY . /workspace/aphrodite-engine
  10. ENV APHRODITE_TARGET_DEVICE="tpu"
  11. RUN cd /workspace/aphrodite-engine && python3 -m pip install -r requirements-tpu.txt
  12. RUN cd /workspace/aphrodite-engine && python3 setup.py develop
  13. # Re-install outlines to avoid dependency errors.
  14. # The outlines version must follow requirements-common.txt.
  15. RUN pip uninstall outlines -y
  16. RUN pip install "outlines>=0.0.43"
  17. CMD ["/bin/bash"]