Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +10 -4
Dockerfile
CHANGED
|
@@ -12,21 +12,27 @@ RUN useradd -m appuser && chown -R appuser:appuser /home/appuser
|
|
| 12 |
|
| 13 |
# Create the directory and give appropriate permissions
|
| 14 |
RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
|
|
|
|
| 15 |
|
| 16 |
USER appuser
|
| 17 |
|
| 18 |
WORKDIR /home/appuser/.ollama
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
# Copy the entry point script
|
| 21 |
-
COPY --chown=appuser entrypoint.sh /entrypoint.sh
|
| 22 |
-
RUN chmod +x /entrypoint.sh
|
| 23 |
|
| 24 |
# Set the entry point script as the default command
|
| 25 |
-
ENTRYPOINT ["/entrypoint.sh"]
|
| 26 |
-
|
| 27 |
|
| 28 |
# Set the model as an environment variable (this can be overridden)
|
| 29 |
ENV model="nomic-embed-text","mixtral"
|
|
|
|
| 30 |
|
| 31 |
# Expose the server port
|
| 32 |
EXPOSE 7860
|
|
|
|
| 12 |
|
| 13 |
# Create the directory and give appropriate permissions
|
| 14 |
RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
|
| 15 |
+
RUN mkdir -p /home/appuser/.ollama/models && chmod /home.appuser/.ollama/models
|
| 16 |
|
| 17 |
USER appuser
|
| 18 |
|
| 19 |
WORKDIR /home/appuser/.ollama
|
| 20 |
|
| 21 |
+
#Copy dossier de models
|
| 22 |
+
|
| 23 |
+
COPY --chown=appuser models /models
|
| 24 |
+
|
| 25 |
# Copy the entry point script
|
| 26 |
+
#COPY --chown=appuser entrypoint.sh /entrypoint.sh
|
| 27 |
+
#RUN chmod +x /entrypoint.sh
|
| 28 |
|
| 29 |
# Set the entry point script as the default command
|
| 30 |
+
#ENTRYPOINT ["/entrypoint.sh"]
|
| 31 |
+
CMD ollama serve
|
| 32 |
|
| 33 |
# Set the model as an environment variable (this can be overridden)
|
| 34 |
ENV model="nomic-embed-text","mixtral"
|
| 35 |
+
ENV "OLLAMA_MODELS=/home/appuser/.ollama/models"
|
| 36 |
|
| 37 |
# Expose the server port
|
| 38 |
EXPOSE 7860
|