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

Update base Fedora images #98

Merged
merged 20 commits into from
Jun 20, 2024
29 changes: 18 additions & 11 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,23 @@ on:
- rocker
- rhub
distribution:
description: Rocker/RHub Distro Name. Eg. rstudio or fedora-gcc-devel
description: Rocker/RHub Distro Name.
required: true
type: choice
default: rstudio
options:
- rstudio
- rstudio-local
- debian-clang-devel
- debian-gcc-devel
- fedora-clang-devel
- fedora-gcc-devel
- debian-gcc-patched
- debian-gcc-release
- gcc13
- gcc14
- atlas
- valgrind
- intel
- nosuggests
- mkl
r_version:
description: R Version
description: |
R version (also used as the tag to pull the origin image).
required: true
type: choice
default: "4.4.0"
Expand All @@ -54,7 +56,9 @@ on:
- "4.4.0"
- "latest"
latest_r_version:
description: "R Version to be aliased as the 'latest' tag"
description: |
R Version to be aliased as the 'latest' tag".
(Only relevant for rocker images).
required: false
type: string
default: "4.4.0"
Expand All @@ -73,7 +77,9 @@ on:
- "3.19"
- "devel"
latest_bioc_version:
description: "BioC Version to be aliased as the 'latest' tag"
description: |
BioC Version to be aliased as the 'latest' tag".
(Only relevant for rocker images).
required: false
type: string
default: "3.19"
Expand Down Expand Up @@ -205,7 +211,8 @@ jobs:
run: |
# Set Image name
image_name="${{ needs.normalize-inputs.outputs.distribution }}_${{ needs.normalize-inputs.outputs.r_version }}_bioc_${{ needs.normalize-inputs.outputs.bioc_version }}"
if [[ "${{ needs.normalize-inputs.outputs.distribution }}" =~ ^debian.*|^fedora.* ]]
# For Fedora-based rhub images.
if [[ "${{ needs.normalize-inputs.outputs.distribution }}" =~ ^gcc.*|^atlas$|^valgrind$|^intel$|^nosuggests$|^mkl$ ]]
then {
image_name="${{ needs.normalize-inputs.outputs.distribution }}"
}
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,31 @@ jobs:
origin: rocker
- distro_tag: 'latest'
bioc: 'devel'
distro: debian-clang-devel
distro: gcc13
origin: rhub
- distro_tag: 'latest'
bioc: 'devel'
distro: debian-gcc-devel
distro: gcc14
origin: rhub
- distro_tag: 'latest'
bioc: 'devel'
distro: fedora-clang-devel
distro: atlas
origin: rhub
- distro_tag: 'latest'
bioc: 'devel'
distro: fedora-gcc-devel
distro: valgrind
origin: rhub
- distro_tag: 'latest'
bioc: '3.19'
distro: debian-gcc-patched
bioc: 'devel'
distro: intel
origin: rhub
- distro_tag: 'latest'
bioc: '3.19'
distro: debian-gcc-release
bioc: 'devel'
distro: nosuggests
origin: rhub
- distro_tag: 'latest'
bioc: 'devel'
distro: mkl
origin: rhub

# Trigger steps
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ COPY --chmod=0755 [\
"./"\
]

# In order to have predictable results from TinyTex installer, set a reliable CTAN mirror.
# This variable is used by:
# https://yihui.org/gh/tinytex/tools/install-base.sh
# which is in turn used by:
# https://raw.githubusercontent.com/yihui/tinytex/master/tools/install-unx.sh.
ENV CTAN_REPO https://mirrors.mit.edu/CTAN/systems/texlive/tlnet

# Install sysdeps
RUN ./install_sysdeps.sh ${DISTRIBUTION}

Expand Down
21 changes: 15 additions & 6 deletions scripts/install_bioc_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ shared_pkgs <- c(
bioc_pkgs <- list(
rstudio = shared_pkgs,
`rstudio-local` = shared_pkgs,
`debian-clang-devel` = shared_pkgs,
`debian-gcc-devel` = shared_pkgs,
`fedora-clang-devel` = shared_pkgs,
`fedora-gcc-devel` = shared_pkgs,
`debian-gcc-patched` = shared_pkgs,
`debian-gcc-release` = shared_pkgs
`gcc13` = shared_pkgs,
`gcc14` = shared_pkgs,
`atlas` = shared_pkgs,
`valgrind` = shared_pkgs,
`intel` = shared_pkgs,
`nosuggests` = shared_pkgs,
`mkl` = shared_pkgs
)

# Get diff of installed and uninstalled packages for
Expand All @@ -44,6 +45,14 @@ new_pkgs <- bioc_pkgs[[distribution]][
!(bioc_pkgs[[distribution]] %in% installed.packages()[, "Package"])
]

# cmdstanr is available on r-universe.dev.
install.packages(
"cmdstanr",
repos='https://stan-dev.r-universe.dev'
)

cmdstanr::install_cmdstan()

# Install only uninstalled packages
if (length(new_pkgs)) {
BiocManager::install(new_pkgs,
Expand Down
15 changes: 8 additions & 7 deletions scripts/install_cran_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,13 @@ cran_pkgs <- list(
pharmaverse_pkgs,
local_dev_packages
),
`debian-clang-devel` = shared_pkgs,
`debian-gcc-devel` = shared_pkgs,
`fedora-clang-devel` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`fedora-gcc-devel` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`debian-gcc-patched` = shared_pkgs,
`debian-gcc-release` = shared_pkgs
`gcc13` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`gcc14` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`atlas` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`valgrind` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`intel` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`nosuggests` = shared_pkgs[!shared_pkgs %in% c("rjags")],
`mkl` = shared_pkgs[!shared_pkgs %in% c("rjags")]
)

# Re-install packages with newer versions
Expand All @@ -270,7 +271,7 @@ if (length(new_pkgs_from_src)) {
}

# Install rjags with special params for fedora distros
if (startsWith(distribution, "fedora")) {
walkowif marked this conversation as resolved.
Show resolved Hide resolved
if (startsWith(distribution, "gcc") || distribution == "atlas" || distribution == "valgrind" || distribution == "intel" || distribution == "nosuggests" || distribution == "mkl") {
install.packages(
"rjags",
type = "source",
Expand Down
13 changes: 7 additions & 6 deletions scripts/install_gh_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ shared_pkgs <- c(
gh_pkgs <- list(
rstudio = shared_pkgs,
`rstudio-local` = shared_pkgs,
`debian-clang-devel` = shared_pkgs,
`debian-gcc-devel` = shared_pkgs,
`fedora-clang-devel` = shared_pkgs,
`fedora-gcc-devel` = shared_pkgs,
`debian-gcc-patched` = shared_pkgs,
`debian-gcc-release` = shared_pkgs
`gcc13` = shared_pkgs,
`gcc14` = shared_pkgs,
`atlas` = shared_pkgs,
`valgrind` = shared_pkgs,
`intel` = shared_pkgs,
`nosuggests` = shared_pkgs,
`mkl` = shared_pkgs
)

# Get diff of installed and uninstalled packages for
Expand Down
13 changes: 7 additions & 6 deletions scripts/install_other_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ other_pkgs <- list(
pharmaverse_packages,
stat_pkgs
),
`debian-clang-devel` = c(stat_pkgs),
`debian-gcc-devel` = c(stat_pkgs),
`fedora-clang-devel` = c(stat_pkgs),
`fedora-gcc-devel` = c(stat_pkgs),
`debian-gcc-patched` = c(stat_pkgs),
`debian-gcc-release` = c(stat_pkgs)
`gcc13` = c(stat_pkgs),
`gcc14` = c(stat_pkgs),
`atlas` = c(stat_pkgs),
`valgrind` = c(stat_pkgs),
`intel` = c(stat_pkgs),
`nosuggests` = c(stat_pkgs),
`mkl` = c(stat_pkgs)
)

# Get diff of installed and uninstalled packages for
Expand Down
13 changes: 7 additions & 6 deletions scripts/install_pip_pkgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ def install(packages=[]):
+ [
"pre-commit",
],
"debian-clang-devel": [],
"debian-gcc-devel": [],
"fedora-clang-devel": [],
"fedora-gcc-devel": [],
"debian-gcc-patched": [],
"debian-gcc-release": [],
"gcc13": [],
"gcc14": [],
"atlas": [],
"valgrind": [],
"intel": [],
"nosuggests": [],
"mkl": [],
}

# Install packages
Expand Down
37 changes: 10 additions & 27 deletions scripts/install_sysdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,34 +112,17 @@ less \
nano \
"

# Deps specific on the debian-clang-devel image
pkgs_to_install_debian["debian-clang-devel"]="${shared_deps_debian} \
jags \
"

# Deps specific on the debian-gcc-devel image
pkgs_to_install_debian["debian-gcc-devel"]="${shared_deps_debian} \
jags \
"

# Deps specific on the debian-gcc-patched image
pkgs_to_install_debian["debian-gcc-patched"]="${shared_deps_debian} \
jags \
"

# Deps specific on the debian-gcc-release image
pkgs_to_install_debian["debian-gcc-release"]="${shared_deps_debian} \
jags \
"

# Deps specific on the fedora-gcc-devel image
pkgs_to_install_fedora["fedora-gcc-devel"]="${shared_deps_fedora}"

# Deps specific on the fedora-clang-devel image
pkgs_to_install_fedora["fedora-clang-devel"]="${shared_deps_fedora}"
# Deps specific to the Fedora-based rhub image.
pkgs_to_install_fedora["gcc13"]="${shared_deps_fedora}"
pkgs_to_install_fedora["gcc14"]="${shared_deps_fedora}"
walkowif marked this conversation as resolved.
Show resolved Hide resolved
pkgs_to_install_fedora["atlas"]="${shared_deps_fedora}"
pkgs_to_install_fedora["valgrind"]="${shared_deps_fedora}"
pkgs_to_install_fedora["intel"]="${shared_deps_fedora}"
pkgs_to_install_fedora["nosuggests"]="${shared_deps_fedora}"
pkgs_to_install_fedora["mkl"]="${shared_deps_fedora}"

# Perform installations for debian distros
if [[ "$distribution" =~ ^rstudio.*|^debian.* ]]
if [[ "$distribution" =~ ^rstudio.* ]]
then {
# Set env vars
export DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -190,7 +173,7 @@ then {
}
fi

if [[ "$distribution" =~ ^fedora.* ]]
if [[ "$distribution" =~ ^gcc.*|^atlas$|^valgrind$|^intel$|^nosuggests$|^mkl$ ]]
then {
# Update
dnf update -y
Expand Down
Loading