Mybinder image launching stuck at "Started container notebook"

Hi,
I have a repository with a Dockerfile set up to be used also in mybinder, but when launching it at Binder it just stays at “Started container notebook”. Does not matter if the image is new or already built. I also used repo2docker to test locally and it worked, using it as
repo2docker --user-id 1000 --user-name jovyan --debug --image-name r2d ./

Sometimes in a previous step I see the error

Successfully pushed 2lmrrh8f.gra7.container-registry.ovh.net/mybinder-builds/r2d-g5b5b759iluvatar1-2dprogcpp-2dlectures-2djupyter-6c4978:69f6cdda869effbc59c29781504ddba98fd3c6f9Exception ignored in: <function Application.__del__ at 0x7f1c18238c20>
Traceback (most recent call last):
  File "/opt/venv/lib/python3.11/site-packages/traitlets/config/application.py", line 1065, in __del__
  File "/opt/venv/lib/python3.11/site-packages/traitlets/config/application.py", line 1054, in close_handlers
  File "/opt/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 687, in __get__
  File "/opt/venv/lib/python3.11/site-packages/traitlets/traitlets.py", line 666, in get
TypeError: 'NoneType' object is not callable

That I cannot really debug, I do not know its source and does not happen when using repo2docker. I also dont know if it is important.

I also tested using what is in mybinder…tutorials…dockerfile.html, and it works
docker run -it --rm -p 8888:8888 my-image jupyter notebook --NotebookApp.default_url=/lab/ --ip=0.0.0.0 --port=8888

I read several threads, like discourse…containers-created-but-spawn-fails-on-mybinder-org…11308, but the solution does not really apply.

If anybody can give me some hint, I will greatly appreciate it. Thanks in advance.

To track it down, you need to progressively add the steps you do in your Dockerfile to that demo one and see where it breaks.

The documentation is clear you are going where there can be issues:

" This is considered an advanced use case , and we cannot guarantee that the Dockerfile will work."

Other suggestions:

Your requirements.txt overlaps significantly with stuff you should be letting the Binder system handle. Please make a binder directory and move your configuration files for MyBinder in there and simplify at least the requirements.txt. Only put in there what is necessary to install if you point MyBinder at a repo with no configuration file.

1 Like

Thanks for your time.
Although it is not working now, the general procedure of using Dockerfile has been working pretty well in the past with complex requirementes.txt and so on. Those requirements are needed for what the enviroment is used. As you said, it seems that I have to invest several hours debugging the Dockerfile to try to catch the problem. I wanted to avoid it but seems inevitable.

Keep in mind there have been substantial changes in tech underlying Jupyter in the last few months, and additionally what is used as defaults in the MyBinder system infrastructure. Thus, what was passable before may cause problems now.

1 Like

It could also just be a lack of resources on the mybinder.org side. The available funding/compute was significantly reduced a couple of years ago, so unfortunately you’re much more likely to run into limitations.

1 Like