Sage-Bionetworks / sage-monorepo

Where OpenChallenges, Schematic, and other Sage open source apps are built
https://sage-bionetworks.github.io/sage-monorepo/
Apache License 2.0
23 stars 12 forks source link

feat(bridge2ai): test an example of Shiny project #2603

Closed rrchai closed 2 weeks ago

rrchai commented 6 months ago

Changelog

Preview

nx prepare bridge2ai-app
nx serve bridge2ai-app

> nx run bridge2ai-app:serve

Loading required package: shiny

Listening on http://127.0.0.1:3838
Screen Shot 2024-03-26 at 5 14 46 PM
tschaffter commented 6 months ago

bridge2ai(feat)

It's the other way around: feat(bridge2ai)

tschaffter commented 2 months ago

@rrchai Could you please share an update about this project here?

tschaffter commented 2 months ago

I gave a try to nx prepare {project} and the command failed:

- Installing terra ...                          FAILED
/opt/R/4.2.3/lib/R/bin/R --vanilla -s -f '/tmp/RtmpvPVUol/renv-install-5c1f8bbc6050.R'
================================================================================

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/workspaces/sage-monorepo/apps/bridge2ai/app/renv/staging/1/terra/libs/terra.so':
  libproj.so.22: cannot open shared object file: No such file or directory
Calls: loadNamespace -> library.dynam -> dyn.load
Execution halted

Error: error testing if 'terra' can be loaded [error code 1]
Traceback (most recent calls last):
14: renv::restore()
13: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
12: renv_install_impl(records)
11: renv_install_staged(records)
10: renv_install_default(records)
 9: handler(package, renv_install_package(record))
 8: renv_install_package(record)
 7: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
 6: renv_install_package_impl(record)
 5: withCallingHandlers(if (isbin) renv_install_test(package), error = function(err) unlink(installpath, 
        recursive = TRUE))
 4: renv_install_test(package)
 3: renv_system_exec(command = R(), args = c("--vanilla", "-s", "-f", 
        renv_shell_path(script)), action = sprintf("testing if '%s' can be loaded", 
        package))
 2: abort(sprintf("error %s [error code %i]", action, status), body = renv_system_exec_details(command, 
        args, output))
 1: stop(fallback)
Execution halted
Warning: command "sudo apt-get install libgdal-dev -y" exited with non-zero status code
Warning: command "Rscript -e 'renv::restore()'" exited with non-zero status code
—————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 NX   Ran target prepare for project bridge2ai-app (3m)

   ✖  1/1 failed
   ✔  0/1 succeeded [0 read from cache]
rrchai commented 2 months ago

@tschaffter Thanks for checking. This pr is probably outdated, and I'll update later this week to make it work.

tschaffter commented 4 weeks ago

[!WARNING]
This branch was created before the repo migrated to pnpm as the Node.js package manager. Consider creating a new branch from main. Alternatively, we could meet in a call to update this branch together.

tschaffter commented 2 weeks ago

This PR hasn't been updated in a while so I'll go ahead and close it. Since this branch still relies on the Yarn package manager, it would be easier to create it again from main rather than update it. This contribution should still be handy in the future.