mljar / mercury

Convert Jupyter Notebooks to Web Apps

Home Page:https://RunMercury.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to run mercury like a package by a docker container?

kskadart opened this issue · comments

Hello folks, I have my a docker-compose yml that include a few services (with nginx proxy), I want to add a mercury app to display my notebooks and show it to my colleagues.
I try to install the mercury app like a package by the pip cmd and run a docker container by docker compose through an entry point: mercury run and as I can see from logs the mercury app runs successfully but if I try to open a web page I see: 127.0.0.1 didn’t send any data.
So the question is how to run the mercury app like a package by a docker container?

Hi @kskadart,

It it better to choose one option:

  1. Run Mercury server in development mode with command mercury run, it will be available on your local machine at 127.0.0.1:8000.
  2. Run Mercury with docker-compose, it will be available at 0.0.0.0. Here is docs https://runmercury.com/docs/docker-compose/

If you really would like to run Mercury as app in docker-compose then please modify entrypoint script https://github.com/mljar/mercury/blob/main/docker/mercury/entrypoint.sh

You can also try to share notebooks with Mercury Cloud https://cloud.runmercury.com - it is free service for up to 10 notebooks (files).

hey. you can write custom dockerfile where you can use any basic os dockerimage as base and they have setup of Python with desired version and they install mercury with its dependencies. After that run mercury at a starting point. In this way you can run mercury inside on simple pod/container and can use volumemount for storing notebooks. Here you can customise docker image with installing all the other libraries that your notebook might use.