Repository: deno
Issue: Deno Jupyter kernel fails to execute code (Docker)
Labels: bug,deno jupyter

I was able to install the Deno Jupyter kernel successfully, however unable to execute any code inside the Docker container

My Dockerfile:

```Dockerfile
FROM jupyter/base-notebook:latest

# Switch to root to install additional dependencies
USER root

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    unzip \
    build-essential \
    curl \
    git \
    jq \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Deno
RUN curl -fsSL https://deno.land/x/install/install.sh | sh && \
    mv /home/jovyan/.deno/bin/deno /usr/local/bin/deno

# Install Deno Jupyter kernel
RUN deno jupyter --install

# Test
COPY template/test.ipynb /home/user/test.ipynb
RUN jupyter execute /home/user/test.ipynb
```

Test:

```
const x = 123;
x
```

```json
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\u001b[33m123\u001b[39m"
      ]
     },
     "execution_count": 1,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "const x = 123;\n",
    "x"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Deno",
   "language": "typescript",
   "name": "deno"
  },
  "language_info": {
   "codemirror_mode": "typescript",
   "file_extension": ".ts",
   "mimetype": "text/x.typescript",
   "name": "typescript",
   "nbconvert_exporter": "script",
   "pygments_lexer": "typescript",
   "version": "5.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
```

Output:

```
[+] Building 11.8s (10/10) FINISHED                                                                                                            docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                           0.0s
 => => transferring dockerfile: 646B                                                                                                                           0.0s
 => [internal] load metadata for docker.io/jupyter/base-notebook:latest                                                                                        0.5s
 => [internal] load .dockerignore                                                                                                                              0.0s
 => => transferring context: 2B                                                                                                                                0.0s
 => [1/6] FROM docker.io/jupyter/base-notebook:latest@sha256:8c903974902b0e9d45d9823c2234411de0614c5c98c4bb782b3d4f55b3e435e6                                  0.0s
 => [internal] load build context                                                                                                                              0.0s
 => => transferring context: 69B                                                                                                                               0.0s
 => CACHED [2/6] RUN apt-get update && apt-get install -y --no-install-recommends     unzip     build-essential     curl     git     jq     && apt-get clean   0.0s
 => CACHED [3/6] RUN curl -fsSL https://deno.land/x/install/install.sh | sh &&     mv /home/jovyan/.deno/bin/deno /usr/local/bin/deno                          0.0s
 => CACHED [4/6] RUN deno jupyter --install                                                                                                                    0.0s
 => CACHED [5/6] COPY template/test.ipynb /home/user/test.ipynb                                                                                                0.0s
 => ERROR [6/6] RUN jupyter execute /home/user/test.ipynb                                                                                                     11.3s
------                                                                                                                                                              
 > [6/6] RUN jupyter execute /home/user/test.ipynb:                                                                                                                 
0.357 [NbClientApp] Executing /home/user/test.ipynb
10.54 Warning "deno jupyter" is unstable and might change in the future.
11.06 [NbClientApp] Executing notebook with kernel: deno
11.18 Traceback (most recent call last):
11.18   File "/opt/conda/bin/jupyter-execute", line 10, in <module>
11.18     sys.exit(main())
11.18              ^^^^^^
11.18   File "/opt/conda/lib/python3.11/site-packages/jupyter_core/application.py", line 280, in launch_instance
11.18     super().launch_instance(argv=argv, **kwargs)
11.18   File "/opt/conda/lib/python3.11/site-packages/traitlets/config/application.py", line 1052, in launch_instance
11.18     app.initialize(argv)
11.18   File "/opt/conda/lib/python3.11/site-packages/traitlets/config/application.py", line 117, in inner
11.18     return method(app, *args, **kwargs)
11.18            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/cli.py", line 114, in initialize
11.18     [self.run_notebook(path) for path in self.notebooks]
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/cli.py", line 114, in <listcomp>
11.18     [self.run_notebook(path) for path in self.notebooks]
11.18      ^^^^^^^^^^^^^^^^^^^^^^^
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/cli.py", line 157, in run_notebook
11.18     client.execute()
11.18   File "/opt/conda/lib/python3.11/site-packages/jupyter_core/utils/__init__.py", line 173, in wrapped
11.18     return loop.run_until_complete(inner)
11.18            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11.18   File "/opt/conda/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
11.18     return future.result()
11.18            ^^^^^^^^^^^^^^^
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/client.py", line 705, in async_execute
11.18     await self.async_execute_cell(
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/client.py", line 1001, in async_execute_cell
11.18     exec_reply = await self.task_poll_for_reply
11.18                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/client.py", line 783, in _async_poll_for_reply
11.18     await asyncio.wait_for(task_poll_output_msg, self.iopub_timeout)
11.18   File "/opt/conda/lib/python3.11/asyncio/tasks.py", line 489, in wait_for
11.18     return fut.result()
11.18            ^^^^^^^^^^^^
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/client.py", line 813, in _async_poll_output_msg
11.18     self.process_message(msg, cell, cell_index)
11.18   File "/opt/conda/lib/python3.11/site-packages/nbclient/client.py", line 1099, in process_message
11.18     display_id = content.get('transient', {}).get('display_id', None)
11.18                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
11.18 AttributeError: 'NoneType' object has no attribute 'get'
------
Dockerfile:24
--------------------
  22 |     # Smell test
  23 |     COPY template/test.ipynb /home/user/test.ipynb
  24 | >>> RUN jupyter execute /home/user/test.ipynb
  25 |     
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c jupyter execute /home/user/test.ipynb" did not complete successfully: exit code: 1
```

Any suggestions?