diff --git a/util/dockerfiles/gcn-gpu/Dockerfile b/util/dockerfiles/gcn-gpu/Dockerfile index 19f3ad7d26..e13367fcde 100644 --- a/util/dockerfiles/gcn-gpu/Dockerfile +++ b/util/dockerfiles/gcn-gpu/Dockerfile @@ -1,5 +1,12 @@ FROM ubuntu:16.04 +# Needed for add-apt-repository +RUN apt-get update && apt-get install -y --no-install-recommends \ + software-properties-common + +# Ubuntu 16.04 does not have a python package new enough for gem5, use a PPA +RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update + # Should be minimal needed packages RUN apt-get update && apt-get install -y --no-install-recommends \ findutils \ @@ -20,11 +27,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libprotoc-dev \ libgoogle-perftools-dev \ python-yaml \ - python3-dev \ - python3 \ - python3-yaml \ - python3-six \ - python3-pip \ + python3.9 \ + python3.9-dev \ + python3.9-distutils \ wget \ libpci3 \ libelf1 \ @@ -37,8 +42,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libboost-dev \ libpng12-dev -RUN python3 -m pip install -U pip && \ - python3 -m pip install -U setuptools scons==3.1.2 +# Use python 3.9 by default +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.9 1 + +# Setuptools is needed for cmake for ROCm build. Install using pip. +# Instructions to install PIP from https://pypi.org/project/pip/ +RUN wget https://bootstrap.pypa.io/get-pip.py -qO get-pip.py +RUN python3 get-pip.py +RUN pip install -U setuptools scons==3.1.2 six ARG gem5_dist=http://dist.gem5.org/dist/develop @@ -152,5 +163,7 @@ RUN cp gfx803_64.cd.pdb.txt gfx801_4.cd.pdb.txt && \ WORKDIR /ROCm-Profiler RUN dpkg -i package/rocm-profiler_4.0.6036_amd64.deb +# Always use python3 and create a link to config command for gem5 to find RUN ln -sf /usr/bin/python3 /usr/bin/python +RUN ln -sf /usr/bin/python3.9-config /usr/bin/python3-config WORKDIR /