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
import os
import pathlib
import subprocess
import shutil
import tempfile
import textwrap
import yaml
......@@ -232,6 +233,12 @@ with tempfile.TemporaryDirectory(prefix="spack-", dir=env["TMPDIR"]) \
as spack_config_file:
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}
# make job temp folder writable for all users (i.e., spack)
......
docker_base_image: "centos:7"
dependency_python: "3.8.3"
docker_base_image: "rockylinux:8"
# 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:
build: false
version: "4.8.5"
version: "8.5.0"
......@@ -65,40 +65,45 @@ From: ${DOCKER_BASE_IMAGE}
# 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
# Apparently, upon building the CentOS docker images it has been decided that
# (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
yum -y upgrade
# EPEL is needed for fuse-sshfs and jq
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# install additional locales
yum install -y "glibc-langpack-*"
# certificates of the base image are outdated -> manually install ca-certificates
yum install -y ca-certificates
# EPEL is needed for fuse-sshfs and jq
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 \
apr \
apr-devel \
apr-util \
apr-util-devel \
autoconf \
automake \
bc \
binutils-devel \
bison \
bzip2 \
chrpath \
compat-db47 \
compat-libtiff3 \
compat-openssl10 \
cups-client \
diffstat \
dos2unix \
ed \
elfutils-libelf \
environment-modules \
expat-devel \
file \
flex \
fontconfig \
freetype \
freetype-devel \
gcc \
gcc-c++ \
gcc-gfortran \
gdb \
git \
glib2-devel \
......@@ -108,18 +113,24 @@ From: ${DOCKER_BASE_IMAGE}
gpm-libs \
ksh \
less \
libffi-devel \
libfontenc \
libgcc \
libgfortran \
libgcrypt-devel \
libICE \
libjpeg-turbo \
libmng \
libnsl \
libnsl.i686 \
libpng12 \
libpng15 \
libSM \
libstdc++-devel \
libstdc++-static \
libstdc++.i686 \
libtool \
libtool-ltdl-devel \
libuuid-devel \
libX11-devel \
libXau-devel \
......@@ -132,6 +143,7 @@ From: ${DOCKER_BASE_IMAGE}
libXft \
libXi \
libxkbfile \
libxml2-devel \
libXmu \
libXp \
libXpm \
......@@ -140,11 +152,14 @@ From: ${DOCKER_BASE_IMAGE}
libXScrnSaver \
libXt \
libXtst \
libyaml-devel \
lsof \
m4 \
mailx \
make \
mesa-dri-drivers \
mesa-libGL \
mesa-libGLU \
motif \
ncurses-devel \
net-tools \
......@@ -152,15 +167,20 @@ From: ${DOCKER_BASE_IMAGE}
openssh \
openssl-devel \
patch \
pax \
patchelf \
perl \
perl-libintl \
perl-Text-Unidecode \
pixman \
psmisc \
python3 \
python3-pip \
python3-setuptools \
pulseaudio-libs \
pulseaudio-libs-glib2 \
python2 \
python2-devel \
python39 \
python39-devel \
python39-pip \
python39-setuptools \
qemu-guest-agent \
redhat-lsb \
rsync \
......@@ -170,7 +190,6 @@ From: ${DOCKER_BASE_IMAGE}
spax \
fuse-sshfs \
strace \
sysvinit-tools \
tar \
tcl \
tcsh \
......@@ -201,25 +220,6 @@ From: ${DOCKER_BASE_IMAGE}
# gtest is F9's C++ test framework of choice
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
yum -y install ccache sudo parallel
......@@ -229,6 +229,8 @@ From: ${DOCKER_BASE_IMAGE}
# ECM: save some more space
yum clean all
alternatives --set python /usr/bin/python3.9
# create a fingerprint by which we can identify the container from within
cat /proc/sys/kernel/random/uuid > /opt/fingerprint
......@@ -268,17 +270,8 @@ From: ${DOCKER_BASE_IMAGE}
MODULESHOME=/usr/share/Modules
export MODULESHOME
# CentOS 7 does not support C.UTF-8; unset everything if encountered.
if [ "\${LANG}" = "C.UTF-8" ]; then
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
# gopath/bin (gocryptfs)
PATH=/opt/go/gopath/bin:\${PATH}
EOF
# create appenvs for all views...
......@@ -292,9 +285,7 @@ cat <<EOF
export VISIONARY_ENV=${name_view}
SVF=/opt/spack_views/\${VISIONARY_ENV}
export PATH=\${SVF}/bin\${PATH:+:}\${PATH}
# there is no python in asic app for now
#export PYTHONHOME=\${SVF}
#export SPACK_PYTHON_BINARY=\${SVF}/bin/python
export PYTHONPATH=\${SVF}/lib/python3.9/site-packages/:\${SVF}/lib64/python3.9/site-packages/\${PYTHONPATH:+:}\${PYTHONPATH}
export MANPATH=\${SVF}/man:\${SVF}/share/man\${MANPATH:+:}\${MANPATH}
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}
......@@ -316,4 +307,10 @@ for view in "${spack_views[@]}"; do
generate_appenv "${view}" "${view}"
[[ "${view}" =~ ^visionary- ]] && generate_appenv "${view#visionary-}" "${view}"
) >> "${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
# 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