Ollama / Dockerfile
PyxiLabs's picture
Update Dockerfile
2f2ba38 verified
raw
history blame
441 Bytes
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"]