Skip to content

Add dockerfile and github action#63

Open
ablack3 wants to merge 6 commits intoOHDSI:developfrom
ablack3:main
Open

Add dockerfile and github action#63
ablack3 wants to merge 6 commits intoOHDSI:developfrom
ablack3:main

Conversation

@ablack3
Copy link

@ablack3 ablack3 commented Mar 6, 2026

@strahinjastevanovic
Copy link
Collaborator

Thank you very much for your contribution @ablack3 !

Could you please provide more details in the PR description about the changes and their intent (for example, regarding quantile, safe_quantile, etc., in main.R)?

Also, could you please check the develop branch for the latest changes? Some of the functions you updated have recently been moved to a new file, stats.R.

We are currently working on more detailed contribution guidelines and will share them soon.

@ablack3 ablack3 changed the base branch from main to develop March 9, 2026 22:47
getConDF <- function(connectionDetails, json, name, cdmSchema, writeSchema){

connection <- DatabaseConnector::connect(connectionDetails = connectionDetails)
on.exit(DatabaseConnector::disconnect(connection), add = TRUE)
Copy link
Author

Choose a reason for hiding this comment

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

Here I think it's good practice to register disconnect right after connecting to make sure connections are not leaked.

Suggests:
testthat (>= 3.0.0),
DBI,
duckdb,
Copy link
Author

Choose a reason for hiding this comment

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

duckdb was taking a long time to compile in the docker image so I removed it. I'm not sure if it is needed for the package though. If it is let me know and I'll add it to the docker image.

@@ -0,0 +1,98 @@
# ARTEMIS Docker Image
Copy link
Author

Choose a reason for hiding this comment

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

This is just a simple readme on how to use the docker image and importantly how to save and load it onto a machine that is not connected to the internet (offline execution situation).

@@ -0,0 +1,99 @@
FROM rocker/rstudio:4.4.3
Copy link
Author

Choose a reason for hiding this comment

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

I had some issues with the latest rocker rstudio image but 4.4.3 seemed to work well. this dockerfile should build the Artemis docker image with all necessary dependencies. I did minimal testing, just to make sure the package was installed and could be loaded.

@@ -0,0 +1,70 @@
name: build-rstudio-image-arm64
Copy link
Author

Choose a reason for hiding this comment

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

I wanted to build both arm64 and amd64 images to support both architectures. I tried using buildx but that took an extremely long time to build on github, possibly due to compilation under emulation. Anyway having two workflow files seemed like the best solution and built the images in parallel on github actions in a reasonable amount of time. These workflows are triggered manually which could be customized to whatever works best for you but they do take a long time to run.

Copy link
Author

Choose a reason for hiding this comment

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

We might also want to build an image for windows too. I think windows can run linux images if WSL is enabled though.


jobs:
build-push-amd64:
runs-on: ubuntu-latest
Copy link
Author

Choose a reason for hiding this comment

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

uses amd64 architecture I think


jobs:
build-push-arm64:
runs-on: ubuntu-24.04-arm
Copy link
Author

Choose a reason for hiding this comment

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

run on an arm based linux machine

@ablack3
Copy link
Author

ablack3 commented Mar 9, 2026

Hi @strahinjastevanovic, Happy to contribute! I made this PR specific to the docker image builders. I tested them on my personal github and added some comments in the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants