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
24 changes: 13 additions & 11 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,18 @@ 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
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 +51,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 +72,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 +206,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 (gcc13 and gcc14) rhub images.
if [[ "${{ needs.normalize-inputs.outputs.distribution }}" =~ ^gcc.* ]]
then {
image_name="${{ needs.normalize-inputs.outputs.distribution }}"
}
Expand Down
20 changes: 2 additions & 18 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,11 @@ 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
origin: rhub
- distro_tag: 'latest'
bioc: 'devel'
distro: fedora-clang-devel
origin: rhub
- distro_tag: 'latest'
bioc: 'devel'
distro: fedora-gcc-devel
origin: rhub
- distro_tag: 'latest'
bioc: '3.19'
distro: debian-gcc-patched
origin: rhub
- distro_tag: 'latest'
bioc: '3.19'
distro: debian-gcc-release
distro: gcc14
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
16 changes: 10 additions & 6 deletions scripts/install_bioc_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,8 @@ 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
)

# Get diff of installed and uninstalled packages for
Expand All @@ -44,6 +40,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
10 changes: 3 additions & 7 deletions scripts/install_cran_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,8 @@ 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")]
)

# Re-install packages with newer versions
Expand All @@ -270,7 +266,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")) {
install.packages(
"rjags",
type = "source",
Expand Down
8 changes: 2 additions & 6 deletions scripts/install_gh_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ 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
)

# Get diff of installed and uninstalled packages for
Expand Down
8 changes: 2 additions & 6 deletions scripts/install_other_pkgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,8 @@ 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)
)

# Get diff of installed and uninstalled packages for
Expand Down
8 changes: 2 additions & 6 deletions scripts/install_pip_pkgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,8 @@ 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": [],
}

# Install packages
Expand Down
32 changes: 5 additions & 27 deletions scripts/install_sysdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,34 +112,12 @@ 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 gcc 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

# 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 +168,7 @@ then {
}
fi

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