-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add GKE A3 Ultra support #940
base: main
Are you sure you want to change the base?
Changes from all commits
08d5a03
e842543
565a187
2e01da0
56fe7c5
dc1e7cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,41 @@ COPY . . | |
# GPU container spec. # | ||
################################################################################ | ||
|
||
FROM base AS gpu | ||
# Using `FROM base as GPU` causes INTERNAL: No valid engine configs for Matmul error. | ||
# So we're using the NVIDIA provided cuda image instead which works. | ||
FROM nvidia/cuda:12.6.3-cudnn-devel-ubuntu22.04 as gpu | ||
|
||
# Copy from original base | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it mean that we will need to keep the following commands consistent with those in BASE? Does Dockerfile support functions? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did some research and sadly the answer is no. We could try to create a bash script that gets used in both instead of copy pasting code. I do agree that we should figure out a way to reuse the same setup steps. |
||
# Install curl and gpupg first so that we can use them to install google-cloud-cli. | ||
# Any RUN apt-get install step needs to have apt-get update otherwise stale package | ||
# list may occur when previous apt-get update step is cached. See here for more info: | ||
# https://docs.docker.com/build/building/best-practices/#apt-get | ||
RUN apt-get update && apt-get install -y curl gnupg | ||
|
||
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ | ||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg && \ | ||
apt-get update -y && \ | ||
apt-get install -y apt-transport-https ca-certificates gcc g++ \ | ||
git screen ca-certificates google-perftools google-cloud-cli \ | ||
gcc g++ python3 python3-venv ibverbs-utils glibc-tools | ||
|
||
RUN ln -s /usr/bin/python3 /usr/bin/python | ||
|
||
# Setup. | ||
RUN mkdir -p /root | ||
WORKDIR /root | ||
# Introduce the minimum set of files for install. | ||
COPY README.md README.md | ||
COPY pyproject.toml pyproject.toml | ||
RUN mkdir axlearn && touch axlearn/__init__.py | ||
# Setup venv to suppress pip warnings. | ||
ENV VIRTUAL_ENV=/opt/venv | ||
RUN python -m venv $VIRTUAL_ENV | ||
ENV PATH="$VIRTUAL_ENV/bin:$PATH" | ||
# Install dependencies. | ||
RUN pip install flit | ||
RUN pip install --upgrade pip | ||
|
||
|
||
# TODO(markblee): Support extras. | ||
ENV PIP_FIND_LINKS=https://storage.googleapis.com/jax-releases/jax_cuda_releases.html | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's make sure this change doesn't break our GPU training on AWS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine but defer to @kelvin-zou
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Second to what Ruoming recommended, maybe split it into Dockerfile.gcp if there are some gcp specific things. and import this docker file as base. The base image import is fine though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There isn't anything GCP specific except installation of
gcloud
which also happens in the axlearn base image. Happy to move toDockerfile.gcp
though since it uses a different base image. I think that makes sense.