Code Monkey home page Code Monkey logo

Comments (5)

gogasca avatar gogasca commented on September 28, 2024 1

I have the same issue.
When a kernel stopped, I would be interested in capturing that signal and call the docker stop command. I would assume we would need to collect the docker image id to be able to call correctly docker stop. I'm not a iPython kernel expert but seems to be this needs to be handled directly by a Kernel Manager such as here: https://github.com/jupyter/notebook/blob/master/notebook/services/kernels/kernelmanager.py

This is my kernel.json file.

{
 "argv": [
  "/usr/bin/docker",
  "run",
  "--network=host",
  "-v",
  "{connection_file}:/connection-spec",
  "gcr.io/deeplearning-platform-release/tf2-cpu.2-4:latest",
  "python",
  "-m",
  "ipykernel_launcher",
  "-f",
  "/connection-spec"
 ],
 "display_name": "tensorflow",
 "language": "python"
}

Update: Not able to reproduce it anymore. Will investigate further

from dockernel.

MrMino avatar MrMino commented on September 28, 2024 1

There you go. dockernel==1.0.1 should fix this issue.

I have no idea why I left all of this without releasing it properly, sorry for that.

from dockernel.

vmenger avatar vmenger commented on September 28, 2024

The normal behaviour for a container when running in the background is to stop whenver the CMD/ENTRYPOINT command stops. In this case the ipykernel receives the shutdown command, after which it terminates and the docker should automatically terminate.

For this project it works correctly most of the time, but in some cases the docker keeps running. I have yet to find a complete reproducible case, but will update if I find one.

from dockernel.

MrMino avatar MrMino commented on September 28, 2024

@vmenger @gogasca IIRC, back at the time I was developing the first release I had the same problem. Changing the default interrupt mode fixed the issue. I don't think this change was released, but it's merged to master (5ca4d06).

BTW. I've just realized that the release I've put out on PyPI either disappeared or was never deployed properly in the first place. Fixing this as we speak. 1.0.1 with the change mentioned above is coming too.

from dockernel.

MrMino avatar MrMino commented on September 28, 2024

Closing this one. If anyone has this same problem again - please make sure it's dockernel==1.0.2 and if so, create a new issue. Thanks!

from dockernel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.