Learning about ollama with LLM ZoomCamp

Hung Le
2 min readJul 9, 2024

--

During my journey with LLM ZoomCamp this year, I explored using ollama through Docker, gaining practical insights into deploying and managing AI models effectively. Here are the key highlights from my experience:

1. Running ollama with Docker

To start with ollama, I leveraged Docker for its flexibility and ease of deployment. Using the command below, I initiated the ollama container, ensuring persistence by mapping a local directory for data storage and exposing a port for communication:

docker run -it \
--rm \
-v ollama_data:/root/.ollama \
-p 11434:11434 \
--name ollama \
ollama/ollama

2. Pulling and Analyzing Models

With ollama up and running, I pulled the gemma:2b model to explore its capabilities. The model metadata, crucial for understanding its configuration and dependencies, was accessible via registry.ollama.ai. This detailed information facilitated seamless integration and troubleshooting.

{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"config": {
"mediaType": "application/vnd.docker.container.image.v1+json",
"digest": "sha256:887433b89a901c156f7e6944442f3c9e57f3c55d6ed52042cbb7303aea994290",
"size": 483
},
"layers": [
{
"mediaType": "application/vnd.ollama.image.model",
"digest": "sha256:c1864a5eb19305c40519da12cc543519e48a0697ecd30e15d5ac228644957d12",
"size": 1678447520
},
{
"mediaType": "application/vnd.ollama.image.license",
"digest": "sha256:097a36493f718248845233af1d3fefe7a303f864fae13bc31a3a9704229378ca",
"size": 8433
},
{
"mediaType": "application/vnd.ollama.image.template",
"digest": "sha256:109037bec39c0becc8221222ae23557559bc594290945a2c4221ab4f303b8871",
"size": 136
},
{
"mediaType": "application/vnd.ollama.image.params",
"digest": "sha256:22a838ceb7fb22755a3b0ae9b4eadde629d19be1f651f73efb8c6b4e2cd0eea0",
"size": 84
}
]
}

3. Visual Representation of Gemma AI

I explored creating a visual representation of Gemma AI, an engaging aspect of my learning journey. This step involved leveraging design tools to encapsulate the essence of artificial intelligence in a visually appealing format.

4. Conclusion

My experience with ollama through LLM ZoomCamp has been enlightening, providing practical skills in Docker deployment, model management, and creative representation of AI concepts. This journey not only enhanced my technical proficiency but also enriched my understanding of AI application in real-world scenarios.

--

--

Hung Le

Software Engineer| Growth Product Manager | Former Community Leader of Facebook For Developers