Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support rhel9 #2240

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# i.e., "./build_openroad.sh --local" from inside a docker container
# NOTE: don't use this file directly unless you know what you are doing,
# instead use etc/DockerHelper.sh
ARG fromImage=openroad/flow-centos7-dev:latest
ARG fromImage=openroad/flow-ubuntu22.04-dev:latest

FROM $fromImage

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# create image with dependencies needed to compile openroad app and run openroad flow scripts
# NOTE: don't use this file directly unless you know what you are doing,
# instead use etc/DockerHelper.sh
ARG fromImage=centos:centos7
ARG fromImage=ubuntu:22.04

FROM $fromImage

Expand Down
37 changes: 37 additions & 0 deletions etc/DependencyInstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,33 @@ _installCentosPackages() {
fi
}

_installRHELCleanUp() {
yum clean -y all
rm -rf /var/lib/apt/lists/*
}

_installRHELPackages() {
klayoutVersion=0.28.17
yum update -y
yum install -y \
time \
ruby \
ruby-devel

if ! [ -x "$(command -v klayout)" ]; then
yum install -y https://www.klayout.org/downloads/RockyLinux_9/klayout-${klayoutVersion}-0.x86_64.rpm
else
currentVersion=$(klayout -v | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
if _versionCompare $currentVersion -ge $klayoutVersion; then
echo "KLayout version greater than or equal to ${klayoutVersion}"
else
echo "KLayout version less than ${klayoutVersion}"
sudo yum remove -y klayout
yum install -y https://www.klayout.org/downloads/RockyLinux_9/klayout-${klayoutVersion}-0.x86_64.rpm
fi
fi
}

_installUbuntuCleanUp() {
apt-get autoclean -y
apt-get autoremove -y
Expand Down Expand Up @@ -218,6 +245,16 @@ case "${os}" in
_installCommon
fi
;;
"Red Hat Enterprise Linux" )
_installORDependencies
if [[ "${option}" == "base" || "${option}" == "all" ]]; then
_installRHELPackages
_installRHELCleanUp
fi
if [[ "${option}" == "common" || "${option}" == "all" ]]; then
_installCommon
fi
;;
"Ubuntu" )
version=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release | sed 's/"//g')
_installORDependencies
Expand Down
7 changes: 5 additions & 2 deletions etc/DockerHelper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ usage: $0 [CMD] [OPTIONS]
push Push the docker image to Docker Hub

OPTIONS:
-os=OS_NAME Choose beween centos7 (default), ubuntu20.04 and ubuntu22.04.
-os=OS_NAME Choose beween ubuntu22.04 (default), ubuntu20.04 and rhel.
-target=TARGET Choose target fo the Docker image:
'dev': os + packages to compile app
'builder': os + packages to compile app +
Expand All @@ -44,6 +44,9 @@ _setup() {
"ubuntu22.04")
osBaseImage="ubuntu:22.04"
;;
"rhel")
osBaseImage="redhat/ubi9"
;;
*)
echo "Target OS ${os} not supported" >&2
_help
Expand Down Expand Up @@ -140,7 +143,7 @@ if [[ -z $(command -v "${_rule}") ]]; then
fi

# default values, can be overwritten by cmdline args
os="centos7"
os="ubuntu22.04"
target="dev"
useCommitSha="no"
numThreads="-1"
Expand Down