Spaces:
Build error
Build error
| FROM ollama/ollama:latest | |
| RUN apt-get update && apt-get install curl -y | |
| # Create a user for running the container | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH \ | |
| OLLAMA_HOST=0.0.0.0 | |
| WORKDIR $HOME/app | |
| # Copy the Modelfile | |
| COPY --chown=user:user Modelfile $HOME/app/ | |
| # Start Ollama in the background and wait for it to be ready | |
| RUN ollama serve & sleep 5 && ollama pull granite-code:3b-instruct-128k-q2_K | |
| # Load the model | |
| RUN ollama create granite-code -f Modelfile | |
| EXPOSE 11434 | |