Skip to content

Commit 6b58622

Browse files
committed
Add dockerfile
1 parent 55f1717 commit 6b58622

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:nightly_3.10_tpuvm_20250321
2+
3+
ARG USE_LOCAL_WHEEL=false
4+
5+
# Install system dependencies
6+
RUN apt-get update && apt-get install -y curl gnupg
7+
8+
# Add the Google Cloud SDK package repository
9+
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
10+
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
11+
12+
# Add the Cloud Storage FUSE distribution URL as a package source
13+
RUN echo "deb https://packages.cloud.google.com/apt gcsfuse-bullseye main" | tee /etc/apt/sources.list.d/gcsfuse.list
14+
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
15+
16+
# Install the Google Cloud SDK and GCS fuse
17+
RUN apt-get update && apt-get install -y google-cloud-sdk git fuse gcsfuse && gcsfuse -v
18+
19+
# Set the default Python version to 3.10
20+
RUN update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.10 1
21+
22+
WORKDIR /workspaces
23+
24+
RUN pip install jax==0.5.4.dev20250321 jaxlib==0.5.4.dev20250321 \
25+
-f https://storage.googleapis.com/jax-releases/jax_nightly_releases.html
26+
27+
COPY . /workspaces/diffusers/
28+
29+
WORKDIR /workspaces/diffusers/examples/research_projects/pytorch_xla/training/text_to_image/
30+
RUN pip3 install -r requirements_sdxl.txt
31+
RUN pip3 install pillow --upgrade
32+
33+
WORKDIR /workspaces/diffusers/
34+
RUN pip3 install .

0 commit comments

Comments
 (0)