{"id":17911944,"url":"https://github.com/mrmino/dockernel","last_synced_at":"2025-03-23T22:34:05.382Z","repository":{"id":53612746,"uuid":"292417093","full_name":"MrMino/dockernel","owner":"MrMino","description":"Dockerized Jupyter kernels","archived":false,"fork":false,"pushed_at":"2021-04-05T23:30:30.000Z","size":51,"stargazers_count":57,"open_issues_count":22,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T23:51:39.784Z","etag":null,"topics":["docker","ipython-kernel","jupyter","jupyter-notebook","jupyter-notebook-kernel"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrMino.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-02T23:33:08.000Z","updated_at":"2024-12-03T15:05:06.000Z","dependencies_parsed_at":"2022-09-19T06:01:48.758Z","dependency_job_id":null,"html_url":"https://github.com/MrMino/dockernel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMino%2Fdockernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMino%2Fdockernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMino%2Fdockernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrMino%2Fdockernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrMino","download_url":"https://codeload.github.com/MrMino/dockernel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245179844,"owners_count":20573553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","ipython-kernel","jupyter","jupyter-notebook","jupyter-notebook-kernel"],"created_at":"2024-10-28T19:40:59.203Z","updated_at":"2025-03-23T22:34:05.079Z","avatar_url":"https://github.com/MrMino.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockernel\n\nMakes it possible to utilize arbitrary docker images as Jupyter kernels.\n\n## Installation, prerequisites\n\nYou will need Docker (obviously). For detailed instructions on how to install\nit, see [Get Docker](https://docs.docker.com/get-docker/) page.\n\nTo install Dockernel, use Pip.\n\n```\npip install dockernel\n```\n\nMake sure that the `jupyter` installation you wish to use with dockerized\nkernels is in the same environment as `dockernel`. Keep in mind, that kernels\ninstalled with Dockernel in one version may not necessarily work with a\ndifferent one.\n\n## Usage\n\n_Note for Linux users:\n\nIf you run into permission errors with `docker` or `dockernel` - either use\n`sudo`, or follow the steps outlined in [Manage Docker as a non-root\nuser](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user)\nguide._\n\n### Creating a Dockernel image\n\nFirst, create a docker image that will host your kernel. This will require a\nproper dockerfile. A full example for IPython kernel can be seen\n[here](https://github.com/MrMino/dockernel/blob/master/example_dockerfile).\n\nMost kernels take a path to a \"connection file\" (also called \"control file\" by\nsome kernels) as a CLI argument. This file contains all of the information\nnecessary to start up a kernel, including TCP ports to use, IP address, etc.\n\nWhen running your container, Dockernel will supply this file and put it into a\npredefined path in the container. This path will be given via an environment\nvariable visible in the container as `$DOCKERNEL_CONNECTION_FILE`.\n\nTherefore, in order for the kernel to know the connection settings it should\nuse, you need to pass the contents of this variable in `CMD` of the container.\nFor example, for IPython kernel:\n\n```\nCMD python -m ipykernel_launcher -f $DOCKERNEL_CONNECTION_FILE\n```\n\nOr for the Rust kernel (Evcxr, see the\n[example Rust\ndockerfile](https://github.com/MrMino/dockernel/blob/master/example_dockerfile)):\n\n```\nCMD evcxr_jupyter --control_file $DOCKERNEL_CONNECTION_FILE\n```\n\nTo build your image, use `docker build`. E.g. to build the example mentioned\nabove:\n\n```\ndocker build --tag my_kernel - \u003c example_dockerfile\n```\n\n### Installing your image as a Jupyter Kernel\n\nAfter that, use Dockernel to install the docker image as a Jupyter kernel:\n\n```\ndockernel install my_kernel --name dockerized_kernel\n```\n\n... and you should be ready to go! Fire up `jupyter notebook` and you should\nsee `dockerized_kernel` under \"New\" menu, or in the \"Notebook\" section of the\nLauncher tab in `jupyter lab`.\n\n## Issues or questions?\n\nPost a new issue in the [Dockernell Issue Tracker at\nGitHub](https://github.com/MrMino/dockernel/issues).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmino%2Fdockernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrmino%2Fdockernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrmino%2Fdockernel/lists"}