diff --git a/dockerfile/ubuntu-22.04-amd64.Dockerfile b/dockerfile/ubuntu-22.04-amd64.Dockerfile index fb8a65f511b2..48674f9d7a67 100644 --- a/dockerfile/ubuntu-22.04-amd64.Dockerfile +++ b/dockerfile/ubuntu-22.04-amd64.Dockerfile @@ -4,6 +4,11 @@ FROM ubuntu:22.04 ARG DEBIAN_FRONTEND=noninteractive ENV DOXYGEN_VERSION=1.9.6 +RUN apt update -y && apt install software-properties-common gpg-agent -y + +# add custom repo +RUN add-apt-repository ppa:deadsnakes/ppa + # Install build and runtime deps COPY /scripts/docker/requirements-22.04.txt /opt/tt_metal_infra/scripts/docker/requirements.txt RUN apt-get -y update \ @@ -63,4 +68,14 @@ RUN python3 -m pip config set global.extra-index-url https://download.pytorch.or RUN python3 -m pip install -r ${TT_METAL_INFRA_DIR}/tt-metal/tt_metal/python_env/requirements-dev.txt RUN python3 -m pip install -r ${TT_METAL_INFRA_DIR}/tt-metal/docs/requirements-docs.txt +# Set python 3.11 and gcc-12 to be default +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 10 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 11 + +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 11 +RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 12 + +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 11 +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 12 + # CMD ["tail", "-f", "/dev/null"] diff --git a/scripts/docker/requirements-22.04.txt b/scripts/docker/requirements-22.04.txt index 7d4be1a23b0b..a0fb302797ad 100644 --- a/scripts/docker/requirements-22.04.txt +++ b/scripts/docker/requirements-22.04.txt @@ -1,7 +1,6 @@ apt-utils dialog build-essential -software-properties-common gcc-12 g++-12 git @@ -15,7 +14,7 @@ curl wget python3-pip libhwloc-dev -python3-dev -python3-venv +python3.11-dev +python3.11-venv cargo -ninja-build +ninja-build \ No newline at end of file