-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
33 lines (24 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Use Python 3.12 as the base image
FROM python:3.12-slim-bullseye
# Install Git
RUN apt-get update && apt-get install -y git
RUN apt-get update && apt-get install -y curl gnupg
# Add the Google Cloud SDK package repository
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
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
# Install the Google Cloud SDK
RUN apt-get update && apt-get install -y google-cloud-sdk
# Set the default Python version to 3.12
RUN update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1
# Set environment variables for Google Cloud SDK and Python 3.12
ENV PATH="/usr/local/google-cloud-sdk/bin:/usr/local/bin/python3.12:${PATH}"
# Set the working directory
WORKDIR /app/accelerator-microbenchmarks
# Clone the local repository
COPY . .
# Install dependencies
RUN pip install --upgrade pip && \
pip install -r requirements.txt
# Set environment variables
ENV JAX_PLATFORMS=tpu,cpu \
ENABLE_PJRT_COMPATIBILITY=true