Skip to content

Add Dockerfile for Llama3 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions training/trillium/Llama3-70B-PyTorch/XPK/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla@sha256:6a98314f2375b493d999871535be6a0a4317691be51534dec81f38e38684e2f6

# Set the working directory
WORKDIR /workspace

# Install PyTorch and Torchvision with the nightly builds
RUN pip3 install --pre torch==2.7.0.dev20250121+cpu torchvision==0.22.0.dev20250121+cpu --index-url https://download.pytorch.org/whl/nightly/cpu
# Install torch_xla for TPU usage
RUN pip3 install https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.7.0.dev20250121+cxx11-cp310-cp310-linux_x86_64.whl

RUN pip3 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

# Clone the PyTorch TPU transformers repository
RUN git clone --branch piz/hybridmesh https://github.com/pytorch-tpu/transformers.git


WORKDIR /workspace/transformers

RUN pip3 install -e .

WORKDIR /workspace

# Set the default command (optional, for example, to run Python)
CMD ["/bin/bash"]