OHDSI / Broadsea

Broadsea deploys the core OHDSI technology stack (Atlas & R Hades), using cross-platform Docker container technology.
http://ohdsi.github.io/Broadsea/
Apache License 2.0
71 stars 54 forks source link

Strategus in Broadsea #110

Open alondhe opened 8 months ago

alondhe commented 8 months ago

https://github.com/OHDSI/Strategus/issues/97

anthonysena commented 6 months ago

Just wanted to make a note about running Strategus on Broadsea since I've spent some time to get this working and wanted to get some feedback on how to potentially share this work with the community.

Some notes on what I've done thus far:

ENV INSTATIATED_MODULES_FOLDER="/home/ohdsi/strategus/modules"
RUN R <<EOF
    ... Contents of the Execute Strategus on Eunomia go here ...
EOF

We may be able to just run Strategus::ensureAllModulesInstantiated with the test analysisSpecification bundled with Strategus but thought running the full study may be better to verify the setup is complete and in good working order.

Questions

  1. Do we want to include Strategus in the Broadsea-Hades container by default or do we want to consider another container that is specifically for running Strategus? Reason I ask: the installation of Strategus and the respective modules is driven by the analysis specification for the study. So, having a container with Strategus installed could be considered the "base" image. To have a complete container for a study, you'd also want to bundle the modules needed for that study (which are detailed in the study analysis specification JSON) in the container so that the download includes everything required. I'm not sure of the best way to layer this together using Docker.
  2. Do we want to modify Broadsea-Hades to include the system libraries mentioned above? I think this would help since I hit issues when installing packages such as keyring, xml2 and when using SqlLite which are all core packages at the moment.
  3. Do we want to automatically include RStudio as part of the container? Perhaps that can be optionally installed/used where necessary?

Tagging @leeevans for awareness and input.

haydenbspence commented 6 months ago

I wonder if using a multi-stage build would be a way to handle the libsecret-1-0, libsodium23, libxml2, libglpk-dev dependencies. Are they needed in building or are they continually used by Strategus @anthonysena?

anthonysena commented 5 months ago

I wonder if using a multi-stage build would be a way to handle the libsecret-1-0, libsodium23, libxml2, libglpk-dev dependencies. Are they needed in building or are they continually used by Strategus @anthonysena?

At the moment, these are used by Strategus when executing. The reason for this is that each module in Strategus will use the keyring package to access a secure store with credentials. We're considering the elimination of using keyring in Strategus to simplify things and to eliminate these types of OS dependencies.

haydenbspence commented 5 months ago

I wonder if using a multi-stage build would be a way to handle the libsecret-1-0, libsodium23, libxml2, libglpk-dev dependencies. Are they needed in building or are they continually used by Strategus @anthonysena?

At the moment, these are used by Strategus when executing. The reason for this is that each module in Strategus will use the keyring package to access a secure store with credentials. We're considering the elimination of using keyring in Strategus to simplify things and to eliminate these types of OS dependencies.

r-wasm has a multi-stage build approach with keyring that may be worth checking out. The foundational (building) image is flang-wasm Dockerfile which includes Ubuntu and dependencies. That image is then referenced by the webr Dockerfile which is finally cleaned and layers squashed.