Skip to content

Commit 1f9f8d2

Browse files
committed
Add pipeline for build R with libs
Add pipeline for build R with libs Add pipeline for build R with libs
1 parent 9c7234a commit 1f9f8d2

File tree

6 files changed

+53
-20
lines changed

6 files changed

+53
-20
lines changed

.circleci/config.yml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,44 @@ jobs:
182182
- docker_login
183183
- setup_buildkit_builder
184184
- run:
185-
name: Build and push python-conda image
185+
name: Build and push ir image
186186
command: |
187187
REPOSITORY="deepnote/ir"
188188
TAG="${R_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}}"
189189
docker buildx build \
190-
--file=./ir/Dockerfile.ir \
190+
--file=./ir/ir-base/Dockerfile.ir \
191+
--tag=978928340082.dkr.ecr.us-east-1.amazonaws.com/${REPOSITORY}:${TAG} \
192+
--tag=docker.io/${REPOSITORY}:${TAG} \
193+
--build-arg R_VERSION=${R_VERSION} \
194+
--build-arg PYTHON_VERSION=${PYTHON_VERSION} \
195+
--cache-from type=registry,ref=docker.io/${REPOSITORY}:${TAG}-buildcache,mode=max \
196+
--cache-to type=registry,ref=docker.io/${REPOSITORY}:${TAG}-buildcache,mode=max,image-manifest=true,oci-mediatypes=true \
197+
--progress plain \
198+
--platform linux/amd64 \
199+
--provenance=false \
200+
--sbom=false \
201+
--output type=registry,push=true \
202+
./ir/ir-base
203+
build-and-push-ir-with-libs:
204+
machine:
205+
image: ubuntu-2404:current
206+
parameters:
207+
r-version:
208+
type: string
209+
environment:
210+
R_VERSION: << parameters.r-version >>
211+
PYTHON_VERSION: "3.9"
212+
steps:
213+
- checkout
214+
- docker_login
215+
- setup_buildkit_builder
216+
- run:
217+
name: Build and push ir with datascience libraries
218+
command: |
219+
REPOSITORY="deepnote/ir-with-libs"
220+
TAG="${R_VERSION}${CIRCLE_PULL_REQUEST:+-ra-${CIRCLE_PULL_REQUEST##*/}}"
221+
docker buildx build \
222+
--file=.ir/ir-with-libs/Dockerfile.ir \
191223
--tag=978928340082.dkr.ecr.us-east-1.amazonaws.com/${REPOSITORY}:${TAG} \
192224
--tag=docker.io/${REPOSITORY}:${TAG} \
193225
--build-arg R_VERSION=${R_VERSION} \
@@ -199,7 +231,7 @@ jobs:
199231
--provenance=false \
200232
--sbom=false \
201233
--output type=registry,push=true \
202-
./ir
234+
./ir/ir-with-libs
203235
204236
build-and-push-gpu:
205237
machine:
@@ -285,6 +317,13 @@ workflows:
285317
r-version: *r-versions
286318
requires:
287319
- Python 3.9.19
320+
- build-and-push-ir-with-libs:
321+
name: R with libs << matrix.r-version >>
322+
matrix:
323+
parameters:
324+
r-version: *r-versions
325+
requires:
326+
- R << matrix.r-version >>
288327

289328
- build-and-push-gpu:
290329
name: Tensorflow 2.9

ir-with-libs/Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

ir/ir-with-libs/Dockerfile.ir

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
ARG R_VERSION=4.2.0
2+
FROM deepnote/ir:${R_VERSION}
3+
4+
5+
# Install the R libraries
6+
RUN R -e "install.packages(c('tidyverse', 'data.table', 'RSQLite', 'remotes', 'reticulate', 'igraph', 'plotly'), dependencies = T)"
7+
8+
# Workaround for Java to install correctly
9+
RUN mkdir -p /usr/share/man/man1/
10+
11+
RUN R -e "install.packages(c('rgl', 'hdf5r', 'rJava'), dependencies = T)"
File renamed without changes.

0 commit comments

Comments
 (0)