File size: 943 Bytes
f74cd06
 
 
 
 
c16fda7
f74cd06
e224688
 
7e286b2
fd4024e
 
f74cd06
7e286b2
af0cf76
f74cd06
b64de7c
 
7e286b2
933c55c
b829baa
 
 
 
c5a91ca
b829baa
 
fa46941
c5a91ca
b829baa
 
b64de7c
c5a91ca
e592999
1e134dc
f74cd06
 
c5a91ca
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
29
30
31
32
33
34
35
36
37
38
39
# 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
RUN mkdir -p /home/appuser/.ollama/models && chmod 777 /home.appuser/.ollama/models

USER appuser

WORKDIR /home/appuser/.ollama

#Copy dossier de models

COPY --chown=appuser models /models

# Copy the entry point script
#COPY --chown=appuser entrypoint.sh /entrypoint.sh
#RUN chmod +x /entrypoint.sh

# Set the entry point script as the default command
#ENTRYPOINT ["/entrypoint.sh"]
CMD ollama serve

# Set the model as an environment variable (this can be overridden)
ENV model="nomic-embed-text","mixtral"
ENV OLLAMA_MODELS="/home/appuser/.ollama/models"

# Expose the server port
EXPOSE 7860