deployement / Dockerfile
GaneshNaiknavare's picture
Update Dockerfile
98b8cb0 verified
raw
history blame contribute delete
541 Bytes
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