Skip to content
Snippets Groups Projects
Commit cdaa7cb5 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist: Committed by Jakob Kaiser
Browse files

asic: Update base image to Rocky 8

Depends-On: 20280
Depends-On: 20692

Change-Id: Ifeda222d9f380ba66fbd35480dbc7c07b25e480f
parent b1aadadf
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ import argparse ...@@ -4,6 +4,7 @@ import argparse
import os import os
import pathlib import pathlib
import subprocess import subprocess
import shutil
import tempfile import tempfile
import textwrap import textwrap
import yaml import yaml
...@@ -232,6 +233,12 @@ with tempfile.TemporaryDirectory(prefix="spack-", dir=env["TMPDIR"]) \ ...@@ -232,6 +233,12 @@ with tempfile.TemporaryDirectory(prefix="spack-", dir=env["TMPDIR"]) \
as spack_config_file: as spack_config_file:
spack_config_file.write(yaml.dump(spack_config)) spack_config_file.write(yaml.dump(spack_config))
spack_packages = pathlib.Path("share", "yashchiki", "styles", args.style, "packages.yaml")
if spack_packages.exists():
shutil.copy(
spack_packages,
temporary_directory_spack_config.joinpath("packages.yaml"))
env = env | {"JOB_TMP_SPACK": temporary_directory_spack} env = env | {"JOB_TMP_SPACK": temporary_directory_spack}
# make job temp folder writable for all users (i.e., spack) # make job temp folder writable for all users (i.e., spack)
......
docker_base_image: "centos:7" docker_base_image: "rockylinux:8"
dependency_python: "3.8.3" # ECM: it's 3.9.18 really, but that's not yet in the current spack; fix when ready
dependency_python: "3.9.16"
spack_gcc: spack_gcc:
build: false build: false
version: "4.8.5" version: "8.5.0"
...@@ -65,40 +65,45 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -65,40 +65,45 @@ From: ${DOCKER_BASE_IMAGE}
# ECM: enable strict mode to fail when packages are not found (or other installation problems appear) # ECM: enable strict mode to fail when packages are not found (or other installation problems appear)
echo "skip_missing_names_on_install=0" >> /etc/yum.conf echo "skip_missing_names_on_install=0" >> /etc/yum.conf
# Apparently, upon building the CentOS docker images it has been decided that yum -y upgrade
# (for space-saving reasons) exactly one locale (en_US.utf8) is installed.
# We don't care about the little extra space and user experience benefits from
# some more locales.
sed -i '/^override_install_langs/d' /etc/yum.conf
yum reinstall -y glibc-common
# EPEL is needed for fuse-sshfs and jq # install additional locales
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum install -y "glibc-langpack-*"
# certificates of the base image are outdated -> manually install ca-certificates # EPEL is needed for fuse-sshfs and jq
yum install -y ca-certificates dnf -y install dnf-plugins-core # needed for `dnf config-manager`
dnf config-manager --set-enabled powertools # powertools is needed by epel-release
dnf -y install epel-release
yum -y install \ yum -y install \
apr \
apr-devel \
apr-util \ apr-util \
apr-util-devel \
autoconf \ autoconf \
automake \ automake \
bc \ bc \
binutils-devel \
bison \ bison \
bzip2 \ bzip2 \
chrpath \ chrpath \
compat-db47 \
compat-libtiff3 \ compat-libtiff3 \
compat-openssl10 \
cups-client \ cups-client \
diffstat \ diffstat \
dos2unix \ dos2unix \
ed \ ed \
elfutils-libelf \
environment-modules \ environment-modules \
expat-devel \
file \ file \
flex \ flex \
fontconfig \ fontconfig \
freetype \ freetype \
freetype-devel \
gcc \ gcc \
gcc-c++ \ gcc-c++ \
gcc-gfortran \
gdb \ gdb \
git \ git \
glib2-devel \ glib2-devel \
...@@ -108,18 +113,24 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -108,18 +113,24 @@ From: ${DOCKER_BASE_IMAGE}
gpm-libs \ gpm-libs \
ksh \ ksh \
less \ less \
libffi-devel \
libfontenc \ libfontenc \
libgcc \ libgcc \
libgfortran \ libgfortran \
libgcrypt-devel \
libICE \ libICE \
libjpeg-turbo \ libjpeg-turbo \
libmng \ libmng \
libnsl \
libnsl.i686 \
libpng12 \ libpng12 \
libpng15 \
libSM \ libSM \
libstdc++-devel \ libstdc++-devel \
libstdc++-static \ libstdc++-static \
libstdc++.i686 \ libstdc++.i686 \
libtool \ libtool \
libtool-ltdl-devel \
libuuid-devel \ libuuid-devel \
libX11-devel \ libX11-devel \
libXau-devel \ libXau-devel \
...@@ -132,6 +143,7 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -132,6 +143,7 @@ From: ${DOCKER_BASE_IMAGE}
libXft \ libXft \
libXi \ libXi \
libxkbfile \ libxkbfile \
libxml2-devel \
libXmu \ libXmu \
libXp \ libXp \
libXpm \ libXpm \
...@@ -140,11 +152,14 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -140,11 +152,14 @@ From: ${DOCKER_BASE_IMAGE}
libXScrnSaver \ libXScrnSaver \
libXt \ libXt \
libXtst \ libXtst \
libyaml-devel \
lsof \ lsof \
m4 \ m4 \
mailx \ mailx \
make \ make \
mesa-dri-drivers \ mesa-dri-drivers \
mesa-libGL \
mesa-libGLU \
motif \ motif \
ncurses-devel \ ncurses-devel \
net-tools \ net-tools \
...@@ -152,15 +167,20 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -152,15 +167,20 @@ From: ${DOCKER_BASE_IMAGE}
openssh \ openssh \
openssl-devel \ openssl-devel \
patch \ patch \
pax \ patchelf \
perl \ perl \
perl-libintl \ perl-libintl \
perl-Text-Unidecode \ perl-Text-Unidecode \
pixman \ pixman \
psmisc \ psmisc \
python3 \ pulseaudio-libs \
python3-pip \ pulseaudio-libs-glib2 \
python3-setuptools \ python2 \
python2-devel \
python39 \
python39-devel \
python39-pip \
python39-setuptools \
qemu-guest-agent \ qemu-guest-agent \
redhat-lsb \ redhat-lsb \
rsync \ rsync \
...@@ -170,7 +190,6 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -170,7 +190,6 @@ From: ${DOCKER_BASE_IMAGE}
spax \ spax \
fuse-sshfs \ fuse-sshfs \
strace \ strace \
sysvinit-tools \
tar \ tar \
tcl \ tcl \
tcsh \ tcsh \
...@@ -201,25 +220,6 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -201,25 +220,6 @@ From: ${DOCKER_BASE_IMAGE}
# gtest is F9's C++ test framework of choice # gtest is F9's C++ test framework of choice
yum -y install gtest-devel yum -y install gtest-devel
# ECM: people (YS) just need pylint, etc. (upgrade to spack if more is needed)
# JJK: nose is needed as a python test runner. We want to replace it by pytest
# in the future
wget https://repo.anaconda.com/miniconda/Miniconda3-py38_4.8.3-Linux-x86_64.sh
bash Miniconda3-py38_4.8.3-Linux-x86_64.sh -b -p /opt/conda
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh
/opt/conda/bin/conda install -y pylint pycodestyle nose pytest pyyaml
# YS: teststand dependencies (no python in spack yet)
/opt/conda/bin/conda install -y numpy matplotlib
# PS: needed for notebook package below
/opt/conda/bin/conda install -c conda-forge -y importlib_metadata
# PD: jupyter notebook and ipython for more comfort
/opt/conda/bin/conda install -c conda-forge -y notebook
/opt/conda/bin/conda install -c conda-forge -y nb_conda_kernels
/opt/conda/bin/conda install -c conda-forge -y jupyter_contrib_nbextensions
# ECM: and now some abspacking # ECM: and now some abspacking
yum -y install ccache sudo parallel yum -y install ccache sudo parallel
...@@ -229,6 +229,8 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -229,6 +229,8 @@ From: ${DOCKER_BASE_IMAGE}
# ECM: save some more space # ECM: save some more space
yum clean all yum clean all
alternatives --set python /usr/bin/python3.9
# create a fingerprint by which we can identify the container from within # create a fingerprint by which we can identify the container from within
cat /proc/sys/kernel/random/uuid > /opt/fingerprint cat /proc/sys/kernel/random/uuid > /opt/fingerprint
...@@ -268,17 +270,8 @@ From: ${DOCKER_BASE_IMAGE} ...@@ -268,17 +270,8 @@ From: ${DOCKER_BASE_IMAGE}
MODULESHOME=/usr/share/Modules MODULESHOME=/usr/share/Modules
export MODULESHOME export MODULESHOME
# CentOS 7 does not support C.UTF-8; unset everything if encountered. # gopath/bin (gocryptfs)
if [ "\${LANG}" = "C.UTF-8" ]; then PATH=/opt/go/gopath/bin:\${PATH}
LANG=C
export LANG
unset LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME LC_MESSAGES LC_ALL
fi
# python now from conda... and gopath/bin (gocryptfs)
PATH=/opt/conda/bin:/opt/go/gopath/bin:\${PATH}
# ensure conda sees a clean env
unset PYTHONHOME
EOF EOF
# create appenvs for all views... # create appenvs for all views...
...@@ -292,9 +285,7 @@ cat <<EOF ...@@ -292,9 +285,7 @@ cat <<EOF
export VISIONARY_ENV=${name_view} export VISIONARY_ENV=${name_view}
SVF=/opt/spack_views/\${VISIONARY_ENV} SVF=/opt/spack_views/\${VISIONARY_ENV}
export PATH=\${SVF}/bin\${PATH:+:}\${PATH} export PATH=\${SVF}/bin\${PATH:+:}\${PATH}
# there is no python in asic app for now export PYTHONPATH=\${SVF}/lib/python3.9/site-packages/:\${SVF}/lib64/python3.9/site-packages/\${PYTHONPATH:+:}\${PYTHONPATH}
#export PYTHONHOME=\${SVF}
#export SPACK_PYTHON_BINARY=\${SVF}/bin/python
export MANPATH=\${SVF}/man:\${SVF}/share/man\${MANPATH:+:}\${MANPATH} export MANPATH=\${SVF}/man:\${SVF}/share/man\${MANPATH:+:}\${MANPATH}
export LIBRARY_PATH=\${SVF}/lib:\${SVF}/lib64\${LIBRARY_PATH:+:}\${LIBRARY_PATH} export LIBRARY_PATH=\${SVF}/lib:\${SVF}/lib64\${LIBRARY_PATH:+:}\${LIBRARY_PATH}
export LD_LIBRARY_PATH=\${SVF}/lib:\${SVF}/lib64\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH} export LD_LIBRARY_PATH=\${SVF}/lib:\${SVF}/lib64\${LD_LIBRARY_PATH:+:}\${LD_LIBRARY_PATH}
...@@ -316,4 +307,10 @@ for view in "${spack_views[@]}"; do ...@@ -316,4 +307,10 @@ for view in "${spack_views[@]}"; do
generate_appenv "${view}" "${view}" generate_appenv "${view}" "${view}"
[[ "${view}" =~ ^visionary- ]] && generate_appenv "${view#visionary-}" "${view}" [[ "${view}" =~ ^visionary- ]] && generate_appenv "${view#visionary-}" "${view}"
) >> "${YASHCHIKI_RECIPE_PATH}" ) >> "${YASHCHIKI_RECIPE_PATH}"
if [ "${view}" = "visionary-asic" ];then
cat <<EOF >>"${YASHCHIKI_RECIPE_PATH}"
export IVERILOG_VPI_MODULE_PATH=\${SVF}/lib/myhdl/share
EOF
fi
done done
# These packages have to be in sync with the packages installed in the base
# image (defined in `create_recipe.sh`).
packages:
autoconf:
buildable: False
externals:
- spec: autoconf@2.69
prefix: /usr
automake:
buildable: False
externals:
- spec: automake@1.16.1
prefix: /usr
bash:
buildable: False
externals:
- spec: bash@4.4.20
prefix: /usr
binutils:
buildable: False
externals:
- spec: binutils@2.30.120
prefix: /usr
bison:
buildable: False
externals:
- spec: bison@3.0.4
prefix: /usr
ccache:
buildable: False
externals:
- spec: ccache@3.7.7
prefix: /usr
cpio:
buildable: False
externals:
- spec: cpio@2.12
prefix: /usr
curl:
buildable: False
externals:
- spec: curl@7.61.1+gssapi+nghttp2
prefix: /usr
diffutils:
externals:
- spec: diffutils@3.6
prefix: /usr
flex:
buildable: False
externals:
- spec: flex@2.6.1+lex
prefix: /usr
gcc:
buildable: False
externals:
- spec: gcc@8.5.0 languages=c,c++,fortran
prefix: /usr
extra_attributes:
compilers:
c: /usr/bin/x86_64-redhat-linux-gcc-8
cxx: /usr/bin/x86_64-redhat-linux-g++
fortran: /usr/bin/gfortran
git:
buildable: False
externals:
- spec: git@2.39.1~tcltk
prefix: /usr
gmake:
buildable: False
externals:
- spec: gmake@4.2.1
prefix: /usr
krb5:
buildable: False
externals:
- spec: krb5@1.18.2
prefix: /usr
libtool:
buildable: False
externals:
- spec: libtool@2.4.6
prefix: /usr
ncurses:
buildable: False
externals:
- spec: ncurses@6.1.20180224+termlib abi=6
prefix: /usr
openssh:
buildable: False
externals:
- spec: openssh@8.0p1
prefix: /usr
openssl:
buildable: False
externals:
- spec: openssl@1.1.1k
prefix: /usr
pkgconf:
buildable: False
externals:
- spec: pkgconf@1.4.2
prefix: /usr
pkg-config:
buildable: False
externals:
- spec: pkgconf@1.4.2
prefix: /usr
python:
buildable: False
externals:
- spec: python@3.9.16+bz2+crypt+ctypes+dbm+lzma+nis+pyexpat+pythoncmd+readline+sqlite3+ssl~tkinter+uuid+zlib
prefix: /usr
xz:
buildable: False
externals:
- spec: xz@5.2.4
prefix: /usr
gawk:
buildable: False
externals:
- spec: gawk@4.2.1
prefix: /usr
libgcrypt:
buildable: False
externals:
- spec: libgcrypt@1.8.5
prefix: /usr
libxml2:
buildable: False
externals:
- spec: libxml2@2.9.7
prefix: /usr
freetype:
buildable: False
externals:
- spec: freetype@2.9.1
prefix: /usr
perl:
buildable: False
externals:
- spec: perl@5.26.3
prefix: /usr
libpng:
buildable: False
externals:
- spec: libpng@1.6.34
prefix: /usr
libyaml:
buildable: False
externals:
- spec: libyaml@0.1.7
prefix: /usr
zlib:
buildable: False
externals:
- spec: zlib@1.2.11
prefix: /usr
zstd:
buildable: False
externals:
- spec: zstd@1.4.4
prefix: /usr
readline:
buildable: False
externals:
- spec: readline@7.0
prefix: /usr
jpeg:
buildable: False
externals:
- spec: libjpeg-turbo@1.5.3
prefix: /usr
libffi:
buildable: False
externals:
- spec: libffi@3.1
prefix: /usr
libjpeg:
buildable: False
gettext:
buildable: False
externals:
- spec: gettext@0.19.8.1
prefix: /usr
bzip2:
buildable: False
externals:
- spec: bzip2@1.0.6
prefix: /usr
m4:
buildable: False
externals:
- spec: m4@1.4.18
prefix: /usr
valgrind:
buildable: False
externals:
- spec: valgrind@3.19.0
prefix: /usr
sed:
buildable: False
externals:
- spec: sed@4.5
prefix: /usr
libedit:
buildable: False
externals:
- spec: libedit@3.1
prefix: /usr
apr:
buildable: False
externals:
- spec: apr@1.6.3
prefix: /usr
apr-util:
buildable: False
externals:
- spec: apr-util@1.6.1
prefix: /usr
expat:
buildable: False
externals:
- spec: expat@2.2.5
prefix: /usr
pcre:
buildable: False
externals:
- spec: pcre@8.42
prefix: /usr
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment