[GH-ISSUE #2912] Running ollama python library together with ollama in colab ? #1785

Closed
opened 2026-04-12 11:48:42 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @timtensor on GitHub (Mar 4, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2912

Hi , thanks for the colab notebook here : https://github.com/ollama/ollama/tree/main/examples/jupyter-notebook . However I have a question how can i run ollama python libraries and scripts on top of the provided notebook. If i understand the service ollama serve is always running right ? We need to stop it before writing and executing other cells.

Originally created by @timtensor on GitHub (Mar 4, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2912 Hi , thanks for the colab notebook here : https://github.com/ollama/ollama/tree/main/examples/jupyter-notebook . However I have a question how can i run ollama python libraries and scripts on top of the provided notebook. If i understand the service ollama serve is always running right ? We need to stop it before writing and executing other cells.
Author
Owner

@mxyng commented on GitHub (Mar 6, 2024):

Jupyter notebooks require each cell to finish before executing other cells. As far as I know, there's no way around it.

The easiest way to accomplish what you're asking is probably to create two notebooks, one serving ollama and the other running your scripts

Alternatively, you can run everything in the same cell using asynchronous calls. That might not be possible depending on the architecture of your notebook

<!-- gh-comment-id:1981953477 --> @mxyng commented on GitHub (Mar 6, 2024): Jupyter notebooks require each cell to finish before executing other cells. As far as I know, there's no way around it. The easiest way to accomplish what you're asking is probably to create two notebooks, one serving ollama and the other running your scripts Alternatively, you can run everything in the same cell using asynchronous calls. That might not be possible depending on the architecture of your notebook
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#1785