Comments (5)
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.
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.
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.
@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.
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)
- Restart docker container when restarting kernel HOT 1
- Improve error messages
- Document architecture
- Subcommand for adding a kernel on top of an already built image
- Package virtual environments / freeze (local work) into docker images?
- Consider alternative docker image atttribute as kernel_id HOT 2
- Support for "--gpus all" and other possible container properties HOT 1
- Using with Podman HOT 3
- Extensions installed via pip not visible in "host" Jupyter HOT 1
- Cannot install example dockerfile HOT 3
- Location of karnels directory HOT 1
- How to mount a local directory? HOT 4
- Can't interrupt kernel cell
- Can't install HOT 1
- Kernel not found after selecting it
- .io page
- Remove / list dockernels
- Command 'None' in image 'my-docker-image' returned non-zero exit status when running on Windows HOT 10
- Make configurable file/directory bindings HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockernel.