Update Dockerfile
Browse files- Dockerfile +9 -8
Dockerfile
CHANGED
@@ -2,9 +2,9 @@ FROM ubuntu:latest
|
|
2 |
|
3 |
#22.04
|
4 |
|
5 |
-
|
6 |
|
7 |
-
|
8 |
|
9 |
# Ajouter un utilisateur non-root pour exécuter l'application (recommandé pour des raisons de sécurité)
|
10 |
|
@@ -28,7 +28,7 @@ USER appuser
|
|
28 |
|
29 |
|
30 |
# Create the directory and give appropriate permissions
|
31 |
-
|
32 |
#RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
|
33 |
#RUN mkdir -p /home/appuser/.ollama/models &&
|
34 |
|
@@ -37,17 +37,18 @@ USER appuser
|
|
37 |
#WORKDIR /.ollama
|
38 |
|
39 |
|
40 |
-
|
41 |
#COPY --chown=appuser model_llm_local/jsonl_llama3_instruct /usr/share/ollama/.ollama/models
|
42 |
|
43 |
#RUN chmod 777 /home/appuser/.ollama/models
|
44 |
# Copy the entry point script
|
45 |
-
COPY --chown=appuser start.sh /start.sh
|
46 |
-
RUN chmod +x /start.sh
|
47 |
|
48 |
# Set the entry point script as the default command
|
49 |
-
ENTRYPOINT ["/start.sh"]
|
50 |
-
|
|
|
51 |
# Set the model as an environment variable (this can be overridden)
|
52 |
#ENV model="nomic-embed-text","yayarun/mixtral_erbot"
|
53 |
ENV OLLAMA_MODELS="/usr/share/ollama/.ollama/models"
|
|
|
2 |
|
3 |
#22.04
|
4 |
|
5 |
+
RUN apt-get update && apt-get install -y whoami
|
6 |
|
7 |
+
RUN whoami
|
8 |
|
9 |
# Ajouter un utilisateur non-root pour exécuter l'application (recommandé pour des raisons de sécurité)
|
10 |
|
|
|
28 |
|
29 |
|
30 |
# Create the directory and give appropriate permissions
|
31 |
+
RUN mkdir -p /.ollama && chmod 777 /.ollama
|
32 |
#RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
|
33 |
#RUN mkdir -p /home/appuser/.ollama/models &&
|
34 |
|
|
|
37 |
#WORKDIR /.ollama
|
38 |
|
39 |
|
40 |
+
COPY --chown=appuser model_llm_local/model_ollama3 /usr/share/ollama/.ollama/models
|
41 |
#COPY --chown=appuser model_llm_local/jsonl_llama3_instruct /usr/share/ollama/.ollama/models
|
42 |
|
43 |
#RUN chmod 777 /home/appuser/.ollama/models
|
44 |
# Copy the entry point script
|
45 |
+
#COPY --chown=appuser start.sh /start.sh
|
46 |
+
#RUN chmod +x /start.sh
|
47 |
|
48 |
# Set the entry point script as the default command
|
49 |
+
#ENTRYPOINT ["/start.sh"]
|
50 |
+
CMD ollama serve
|
51 |
+
#& sleep 30 && ollama pull llama3:8b-instruct-q8_0
|
52 |
# Set the model as an environment variable (this can be overridden)
|
53 |
#ENV model="nomic-embed-text","yayarun/mixtral_erbot"
|
54 |
ENV OLLAMA_MODELS="/usr/share/ollama/.ollama/models"
|