File size: 522 Bytes
566bacc
c8ff5b2
b9fefcc
 
33d74f8
 
566bacc
33d74f8
566bacc
33d74f8
6c6c988
b0dee4e
 
 
33d74f8
b9fefcc
c8ff5b2
33d74f8
 
b0dee4e
c8ff5b2
 
33d74f8
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.10-slim-buster

WORKDIR /app

# Copy the script into the container's /app directory
COPY ollama.sh /app/ollama.sh

# Create virtual environment and set permissions
RUN python -m venv venv && \
    chmod +x /app/ollama.sh

# Install Ollama
RUN curl https://ollama.ai/install.sh | sh

# Prepare Ollama directory
RUN mkdir -p /.ollama && chmod 777 /.ollama

# Ensure Ollama binary is accessible
ENV PATH="/root/.ollama/bin:$PATH"

EXPOSE 11434

# Use the correct path to the script
ENTRYPOINT ["/app/ollama.sh"]