File size: 1,528 Bytes
3abf7fd
a1e3131
 
d5601e0
92668c5
cedc831
92668c5
cedc831
3eb3d73
1686f74
d5601e0
92668c5
125b878
 
18471aa
 
 
840445b
a14df7c
3abf7fd
a14df7c
de90e56
813e9b4
afad640
b6518fd
 
28c09f5
813e9b4
3243695
3abf7fd
8e412d6
125b878
 
 
813e9b4
125b878
 
 
 
 
 
 
 
7b57894
db08a9c
125b878
 
 
7b57894
 
125b878
 
7b57894
 
0898998
125b878
 
7b57894
3243695
198b72c
 
ac446bc
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
FROM ubuntu:latest

#22.04

#RUN apt-get update && apt-get install -y whoami

#RUN whoami

# Ajouter un utilisateur non-root pour exécuter l'application (recommandé pour des raisons de sécurité)


RUN apt update && apt install curl -y

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

ENV OLLAMA_HOST=0.0.0.0

RUN cut -d: -f1,3 /etc/passwd

RUN userdel ubuntu && useradd -m -u 1000 appuser


#RUN chown -R appuser:appuser /home/appuser

#RUN apt-get update && apt-get install -y \ 
#python3-pip

#USER appuser

#RUN useradd -m -u 1000 appuser 
#&& chown -R appuser:appuser /home/appuser


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

#USER appuser

#WORKDIR /.ollama


COPY --chown=appuser model_llm_local/model_ollama3 /usr/share/ollama/.ollama/models
#COPY --chown=appuser model_llm_local/jsonl_llama3_instruct /usr/share/ollama/.ollama/models

#RUN chmod 777 /home/appuser/.ollama/models
# Copy the entry point script
#COPY --chown=appuser start.sh /start.sh
#RUN chmod +x /start.sh

# Set the entry point script as the default command
#ENTRYPOINT ["/start.sh"]
CMD ollama serve
#& sleep 30 && ollama pull llama3:8b-instruct-q8_0
# Set the model as an environment variable (this can be overridden)
#ENV model="nomic-embed-text","yayarun/mixtral_erbot"
ENV OLLAMA_MODELS="/usr/share/ollama/.ollama/models"

# Expose the server port
EXPOSE 7860