File size: 540 Bytes
f74cd06
 
 
 
 
c16fda7
f74cd06
e224688
 
7e286b2
fd4024e
 
f74cd06
7e286b2
f74cd06
b64de7c
 
 
 
7e286b2
933c55c
d66ffe4
fa46941
b64de7c
f74cd06
 
f1c58cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Builder stage
FROM ubuntu:latest

RUN apt update &&  apt install curl -y

RUN curl -fsSL https://ollama.com/install.sh | sh

ENV OLLAMA_HOST=0.0.0.0

RUN useradd -m appuser && chown -R appuser:appuser /home/appuser


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

USER appuser

COPY  --chown=appuser ./Yaya86/ollama-server/id_ed25519.pub ./home/appuser/.ollama

WORKDIR /home/appuser/.ollama

CMD ["ollama", "serve"]



# Expose the server port
EXPOSE 11434