Skip to content
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
4 changes: 2 additions & 2 deletions ir/ir-base/Dockerfile.ir
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ RUN python -m venv jupyter-env && \
. ./jupyter-env/bin/activate && \
pip install --upgrade pip notebook

# Install IRkernel and configure it
# Install IRkernel and configure it (using Posit Package Manager for faster binary installs)
RUN . ./jupyter-env/bin/activate && \
R -e "install.packages('IRkernel', repos='http://cran.rstudio.com/')" && \
R -e "install.packages('IRkernel', repos='https://packagemanager.posit.co/cran/__linux__/bullseye/latest')" && \
R -e "IRkernel::installspec()"

# Clean up unnecessary files to reduce the image size
Expand Down
48 changes: 32 additions & 16 deletions ir/ir-with-libs/Dockerfile.ir
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,35 @@ xfonts-base \
xvfb \
zlib1g-dev"

RUN apt-get update && apt-get install -y ${BUILDDEPS} \
&& \
# Install the R libraries
R -e "install.packages('tidyverse', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('data.table', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('RSQLite', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('remotes', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('reticulate', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('igraph', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('plotly', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('rgl', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('hdf5r', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
R -e "install.packages('rJava', repos='https://cloud.r-project.org', dependencies=TRUE)" && \
apt-get clean && \
apt-get remove --purge -y ${BUILDDEPS} && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Use Posit Package Manager for precompiled Linux binaries
ENV CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/bullseye/latest"

Comment on lines +50 to +52
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Pin CRAN snapshot for reproducible builds.
Using latest can shift binaries over time. Prefer a dated snapshot URL to keep images deterministic.

♻️ Example update
-ENV CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/bullseye/latest"
+ENV CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/bullseye/2026-01-23"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Use Posit Package Manager for precompiled Linux binaries
ENV CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/bullseye/latest"
# Use Posit Package Manager for precompiled Linux binaries
ENV CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/bullseye/2026-01-23"
🤖 Prompt for AI Agents
In `@ir/ir-with-libs/Dockerfile.ir` around lines 50 - 52, The CRAN repo is set to
a moving "latest" snapshot via the ENV CRAN_REPO variable; replace that value
with a dated Posit Package Manager snapshot URL to pin binaries for reproducible
builds (update the ENV CRAN_REPO entry in Dockerfile.ir to a specific snapshot
date, e.g. use the Posit snapshot path with a YYYY-MM-DD segment instead of
"latest"). Ensure the ENV CRAN_REPO assignment is updated wherever it appears so
builds use the fixed dated snapshot.

# R packages to install
ENV R_PACKAGES="\
tidyverse \
data.table \
RSQLite \
remotes \
reticulate \
igraph \
plotly \
rgl \
hdf5r \
rJava"

RUN apt-get update \
&& apt-get install -y ${BUILDDEPS} \
&& R -e " \
options( \
Ncpus = 4, \
HTTPUserAgent = sprintf('R/%s R (%s)', getRversion(), paste(getRversion(), R.version['platform'], R.version['arch'], R.version['os'])) \
); \
install.packages( \
strsplit(Sys.getenv('R_PACKAGES'), '\\\\s+')[[1]], \
repos = Sys.getenv('CRAN_REPO'), \
dependencies = TRUE \
) \
" \
&& apt-get clean \
&& apt-get remove --purge -y ${BUILDDEPS} \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*