Matthew Poremba has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/37219 )

Change subject: util: Update python version for GCN3
......................................................................

util: Update python version for GCN3

The Python version installed in the Dockerfile for GCN3 by apt-get is
too old to build gem5. This bumps the version to the most recent Python
to avoid needing to update this file too much.

Python 3.9 is install via PPA since it is not available in the official
Ubuntu 16.04 repository. Likewise, pip is installed from "source" as it
is not available for Python 3.9 in from neither the PPA nor Ubuntu.

Change-Id: Ia919f31cf9c9063e1df091cea15590526715739b
---
M util/dockerfiles/gcn-gpu/Dockerfile
1 file changed, 20 insertions(+), 7 deletions(-)



diff --git a/util/dockerfiles/gcn-gpu/Dockerfile b/util/dockerfiles/gcn-gpu/Dockerfile
index 19f3ad7..e13367f 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 @@
     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 @@
     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 @@
 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 /

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/37219
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ia919f31cf9c9063e1df091cea15590526715739b
Gerrit-Change-Number: 37219
Gerrit-PatchSet: 1
Gerrit-Owner: Matthew Poremba <matthew.pore...@amd.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to