Jupyter Kernel stuck on "Connecting" in Docker (CellOracle) on macOS Silicon (M2)

13 hours ago 1
ARTICLE AD BOX

I am trying to run the CellOracle Docker image (kenjikamimoto126/celloracle_ubuntu:0.18.0) on my Mac (Apple Silicon/ M2MAX 2023 Macbook Pro). I could successfully start the container and access the Jupyter file tree in my browser, but when I open a notebook, the Kernel status remains stuck on "Connecting" forever. For reproducibility and to avoid any conflicts, I prefer using their Docker image instead of my local environment.

Steps: I basically followed every single step described here: https://morris-lab.github.io/CellOracle.documentation/installation/docker_additional_information.html

My Environment:

OS: macOS (Apple Silicon M2)

Docker Image: kenjikamimoto126/celloracle_ubuntu:0.18.0 (Running with --platform linux/amd64)

Browser: Chrome (also tried Safari)

Initially, the kernel would crash immediately with a KeyError: 'iopub' trace. I identified this as a conflict between tornado and jupyter. I fixed this by running pip install "tornado<6.2" inside the container.

Now, the server logs show the kernel starting successfully, but the browser UI never switches to "Idle"—it hangs on "Connecting".

Command used to run Docker:

docker rm -f celloracle_container # after the initial trial docker run -dit \ --name celloracle_container \ --platform linux/amd64 \ --security-opt seccomp=unconfined \ -p 9999:9999 \ -v ~/Desktop/celloracle_data:/root/data_folder \ kenjikamimoto126/celloracle_ubuntu:0.18.0

Command used to start Jupyter:

docker exec -it celloracle_container jupyter notebook --port=9999 --ip=0.0.0.0 --allow-root --no-browser

And I used the link (with token) in my browser.

Logs from Jupyter:

Plaintext

[I 04:53:08.046 ServerApp] Kernel started: 830dce8a-03ec-4a34... [I 04:53:08.048 ServerApp] Connecting to kernel 830dce8a...

(No further errors appear in the logs, but the browser console shows WebSocket connection failures or timeouts. And eventually time out.)

What I have tried:

Downgraded Tornado (pip install "tornado<6.2") - This stopped the immediate crash, but didn't fix the UI connection.

Allocate 32GB of memory to Docker. Terminate, re-download the Docker.

Switched ports from 8888 to 9999 to avoid local conflicts.

Tried accessing via http://127.0.0.1:9999 and http://localhost:9999.

Has anyone successfully run this legacy CellOracle image on Apple Silicon recently? Is there an additional flag needed for WebSocket connections to pass through the Rosetta emulation?

I literally spent 5 hours this afternoon in the lab, and I kind of gave up...any help would be very much appreciated!!

Read Entire Article