forked from selalipop/aphrodite-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.tpu
24 lines (18 loc) · 970 Bytes
/
Dockerfile.tpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ARG NIGHTLY_DATE="20240808"
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.
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
# Build Aphrodite.
COPY . /workspace/aphrodite-engine
ENV APHRODITE_TARGET_DEVICE="tpu"
RUN cd /workspace/aphrodite-engine && python3 -m pip install -r requirements-tpu.txt
RUN cd /workspace/aphrodite-engine && python3 setup.py develop
# Re-install outlines to avoid dependency errors.
# The outlines version must follow requirements-common.txt.
RUN pip uninstall outlines -y
RUN pip install "outlines>=0.0.43"
RUN pip install triton
CMD ["/bin/bash"]