# Ollama keeps building, doesn't start

**URL:** <https://discuss.huggingface.co/t/ollama-keeps-building-doesnt-start/94540>\
**Category:** Spaces\
**Created:** [June 28, 2024, 8:03am UTC](https://discuss.huggingface.co/t/ollama-keeps-building-doesnt-start/94540 "2024-06-28T08:03:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jadeantonio](https://avatars.discourse-cdn.com/v4/letter/j/8dc957/32.png) [@jadeantonio](https://discuss.huggingface.co/u/jadeantonio)\
**Post date:** [June 28, 2024, 8:03am UTC](https://discuss.huggingface.co/t/ollama-keeps-building-doesnt-start/94540/1 "2024-06-28T08:03:15Z")

</div>

Hi guys, I want to run Ollama in HF Space. when I tried to deploy using this Dockerfile, I just kept building. it never ruined.

FROM ubuntu  
RUN apt-get update  
RUN apt-get install -y curl  
RUN curl -fsSL [https://ollama.com/install.sh](https://ollama.com/install.sh) | sh  
RUN ollama serve  
RUN ollama pull qwen: 0.5b  
CMD ollama run qwen: 0.5b  
EXPOSE 11434

Here is the space link-  
[https://jadeantonio-ollama.hf.space](https://jadeantonio-ollama.hf.space)

ID-  
jadeantonio/ollama

---

<div class="post-metadata">

**Author:** ![eXorcyst](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/exorcyst/32/42970_2.png) [@eXorcyst](https://discuss.huggingface.co/u/eXorcyst)\
**Post date:** [March 10, 2025, 9:36pm UTC](https://discuss.huggingface.co/t/ollama-keeps-building-doesnt-start/94540/2 "2025-03-10T21:36:49Z")

</div>

I think Hugging Face spaces apps must run on port 7860.

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](https://discuss.huggingface.co/u/John6666)\
**Post date:** [March 11, 2025, 3:28am UTC](https://discuss.huggingface.co/t/ollama-keeps-building-doesnt-start/94540/3 "2025-03-11T03:28:40Z")

</div>

Or like this in **README.md**.

> **[Spaces Configuration Reference](https://huggingface.co/docs/hub/spaces-config-reference)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

> **`app_port`** : _int_  
> Port on which your application is running. Used only if `sdk` is `docker`. Default port is `7860`.
