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 \
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 \
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
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 /