# Builder stage
FROM ubuntu:latest

RUN apt update &&  apt install curl -y

RUN curl https://ollama.ai/install.sh | sh

# Create the directory and give appropriate permissions
RUN mkdir -p /.ollama && chmod 777 /.ollama

COPY ./TamilLlama_Modelfile /.ollama/TamilLlama_Modelfile
RUN curl -L https://huggingface.co/abhinand/tamil-llama-7b-instruct-v0.1-gguf/resolve/main/tamil-llama-7b-v0.1-q4_k_m.gguf -o /.ollama/tamil-llama-7b-v0.1-q4_k_m.gguf

WORKDIR /.ollama

# Command to run the application
CMD ollama serve 

# Expose the server port
EXPOSE 7860