File size: 441 Bytes
566bacc c8ff5b2 b9fefcc 6c6c988 566bacc f760f3a 6c6c988 b0dee4e b9fefcc c8ff5b2 b0dee4e c8ff5b2 2f2ba38 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
FROM python:3.10-slim-buster
WORKDIR /app
COPY ollama.sh /app
RUN python -m venv venv && \
. /app/venv/bin/activate
RUN chmod +x ollama.sh
# Install Ollama
RUN curl https://ollama.ai/install.sh | sh
# Create the directory and give appropriate permissions
RUN mkdir -p /.ollama && chmod 777 /.ollama
# Ensure Ollama binary is in the PATH
ENV PATH="/app/venv/bin:/root/.ollama/bin:$PATH"
EXPOSE 11434
ENTRYPOINT ["/ollama.sh"] |