Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Docker container #385

Open
artur-sannikov opened this issue Jan 10, 2024 · 15 comments
Open

Improve Docker container #385

artur-sannikov opened this issue Jan 10, 2024 · 15 comments

Comments

@artur-sannikov
Copy link
Contributor

Right now Docker container is very basic and cannot be used.

I managed to run in with Podman 4.8.3 :

podman pull https://github.com/js2264/OMA/pkgs/container/OMA
podman run --rm -p 8787:8787 <container_id>

It's then accessible on localhost:8787. Username root and password is given in shell.

There are no accessible files in RStudio web-interface. Inside the container there is a OMA_0.98.16.tar.gz archive.

BiocBook supports containerization, so it a Docker image might be nice to have because it can help avoid all dependency issues on different platforms and their versions people run.

@TuomasBorman
Copy link
Contributor

Thanks! We will take this into account

@artur-sannikov
Copy link
Contributor Author

You now need to run podman pull ghcr.io/js2264/oma:latest.

@antagomir
Copy link
Member

@artur-sannikov is this ready?

@artur-sannikov
Copy link
Contributor Author

@antagomir, currently the most up-to-date container is on ghcr.io/microbiome/oma, but it's private and requires logging in with docker login ghcr.io. I just tried it on a fresh install of Fedora server and it fails at

[23/37] pages/multiassay_ordination.qmd


processing file: multiassay_ordination.qmd
  |..........................................               |  74% [mofa6]     Error in `py_get_attr()`:
! AttributeError: module 'mofapy2' has no attribute 'run.entry_point'
Run `reticulate::py_last_error()` for details.
Backtrace:
 1. MOFA2::run_mofa(model, use_basilisk = TRUE)
 2. basilisk::basiliskRun(...)
 3. MOFA2 (local) fun(...)
 4. MOFA2:::.run_mofa_reticulate(object, outfile, save_data)
 6. reticulate:::`$.python.builtin.module`(mofa, "run.entry_point")
 7. reticulate::py_get_attr(x, name, FALSE)



Quitting from lines 126-136 [mofa6] (multiassay_ordination.qmd)
                                                                                                       
Execution halted
Error in run_serve_daemon("preview", file, NULL, args, render, port, host,  : 
  Error starting quarto

Image ghcr.io/js2264/oma:latest is outdated.

@TuomasBorman
Copy link
Contributor

@artur-sannikov MOFA2 is causing this issue, but any idea why? Any idea how to fix this?

@artur-sannikov
Copy link
Contributor Author

I'm not even able to build an image on GitHub: https://github.com/artur-sannikov/OMA/actions/runs/10055341285/job/27791808192 because it fails due to API rate limiting (it's too big, I guess). I want to try standalone Docker build without relying on BiocBook.

@artur-sannikov
Copy link
Contributor Author

We need to install Python to solve this issue. Uncomment three lines here.

I opened #585.

@antagomir
Copy link
Member

The #585 is merged now. Can we close this one as well @artur-sannikov ?

@artur-sannikov
Copy link
Contributor Author

artur-sannikov commented Aug 6, 2024

@antagomir, the image ghcr.io/js2264/oma:latest is not built anymore. This image should be made public. We can then close. I'll open a PR to update README.

@antagomir
Copy link
Member

If you can take care of closing this issue when it is ready that would be great.

@artur-sannikov
Copy link
Contributor Author

Someone with access to the container registry settings, needs to make the image public.

@TuomasBorman
Copy link
Contributor

TuomasBorman commented Aug 7, 2024

That requires changing settings from organization level. Does it now work?

Another thing:

It seems that Docker is not working anymore since it exceeds the cache. I tried to fix it month ago (62d6764, d824b65, 80a8541, 4e80d2f, 988a78c). It worked, but now it exceeds the limit again (Maybe new packages were added to OMA). See the GHA report: https://github.com/microbiome/OMA/actions/runs/10271529523/job/28421702599

Would you be able to fix this @artur-sannikov ? This is somewhat urgent since the run does not work and OMA is not updated. I would recommend involving BiocBook to this. This affects all BiocBook users and the guy might have some idea how to fix.

@antagomir
Copy link
Member

We can probably afford extra space when necessary but it would be anyway good to minimize the loads.

@artur-sannikov
Copy link
Contributor Author

It took > 1 hour to build: https://github.com/artur-sannikov/OMA/actions/runs/10280588960/job/28448241727#step:12:8806, but the building part was successful. It was not pushed due to token permissions I think, but it's not a problem.

I think such long build time is due to miniconda installation to fix #585. I cannot build the image locally because I hit the API rate limit.

@artur-sannikov
Copy link
Contributor Author

Ok, so at the moment, the Docker container builds and is published on the package page. However, the current version 0.98.30 fails when build the book with BiocBook::preview(BiocBook::BiocBook('.')) as stage 22/38.


[22/38] pages/multiassay_ordination.qmd


processing file: multiassay_ordination.qmd
  |........................................                 |  71% [mofa6]     Error in `py_get_attr()`:
! AttributeError: module 'mofapy2' has no attribute 'run.entry_point'
Run `reticulate::py_last_error()` for details.
Backtrace:
  1. global .main()
  2. execute(...)
  3. rmarkdown::render(...)
  4. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
  5. knitr:::process_file(text, output)
     ...
 16. base::withRestarts(...)
 17. base (local) withRestartList(expr, restarts)
 18. base (local) withOneRestart(withRestartList(expr, restarts[-nr]), restarts[[nr]])
 19. base (local) docall(restart$handler, restartArgs)
 21. evaluate (local) fun(base::quote(`<python.builtin.AttributeError>`))
                                                                                                       



Quitting from lines 114-124 [mofa6] (multiassay_ordination.qmd)
Execution halted
Error in run_serve_daemon("preview", file, NULL, args, render, port, host,  : 
  Error starting quarto

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

No branches or pull requests

3 participants