From 7bf2f7453f0e6b99215395bc14385fe54323b97c Mon Sep 17 00:00:00 2001 From: John Agapiou Date: Tue, 11 Jul 2023 09:49:49 -0700 Subject: [PATCH] Update docker image to ubuntu 22.04 and Python 3.10 Fixes https://github.com/deepmind/meltingpot/issues/147 PiperOrigin-RevId: 547217817 Change-Id: I4d4dc76264907096730c35ab422a33572a7988f3 --- .devcontainer/Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index b3ccff87..2917f9b0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ -# Use Nvidia Ubuntu 20 base (includes CUDA if a supported GPU is present) +# Use Nvidia Ubuntu 22 base (includes CUDA if a supported GPU is present) # https://hub.docker.com/r/nvidia/cuda -FROM nvidia/cuda:12.0.1-cudnn8-devel-ubuntu20.04@sha256:b10f2515f33613fe9eaacd03842d38093fedeb98b25170ae82a5ef77fe2a7e76 +FROM nvidia/cuda:12.2.0-devel-ubuntu22.04@sha256:7e81c70fb55bfc54e6711700eb721bb94159a3cd546620b37210d12c17914fa6 # Install dependencies RUN apt-get update && \ @@ -9,18 +9,18 @@ RUN apt-get update && \ curl \ ffmpeg \ git \ - python3.9 \ - python3.9-dev \ - python3.9-distutils \ + python3.10 \ + python3.10-dev \ + python3.10-distutils \ rsync +# Set python aliases +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 + # Install pip (we need the latest version not the standard Ubuntu version, to # support modern wheels) -RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3.9 get-pip.py - -# Set python aliases -RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.9 1 -RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py # Install python dev dependencies RUN pip install \ @@ -31,7 +31,7 @@ RUN pip install \ yapf # Install lab2d from wheel. -RUN pip install https://github.com/deepmind/lab2d/releases/download/release_candidate_2023-06_01/dmlab2d-1.0-cp39-cp39-manylinux_2_35_x86_64.whl +RUN pip install https://github.com/deepmind/lab2d/releases/download/release_candidate_2023-06_01/dmlab2d-1.0-cp310-cp310-manylinux_2_35_x86_64.whl # Set Python path ENV PYTHONPATH="/workspaces/meltingpot"