Spaces:
Runtime error
Runtime error
lucianotonet
commited on
Commit
•
596dfe2
1
Parent(s):
3e7fba6
Optimize Dockerfile: use RUN for server setup
Browse filesReplaced CMD with RUN to ensure the server initializes effectively during the build process. This adjustment helps streamline the setup, allowing the model to be created and run consistently within the container context, improving reliability and minimizing runtime issues.
Optimize Dockerfile for server setup
Replaced CMD with RUN to establish the server during the build process, ensuring a more reliable initialization of the model. This adjustment enhances the overall stability and consistency of the container's runtime behavior, reducing potential issues related to server startup.
- Dockerfile +4 -2
Dockerfile
CHANGED
@@ -19,7 +19,9 @@ ENV HOME=/home/user \
|
|
19 |
COPY --chown=user:user Modelfile $HOME/Modelfile
|
20 |
|
21 |
# Iniciar o servidor Ollama, baixar o modelo e manter o servidor em execução
|
22 |
-
|
23 |
|
24 |
# Expor a porta do Ollama
|
25 |
-
EXPOSE 11434
|
|
|
|
|
|
19 |
COPY --chown=user:user Modelfile $HOME/Modelfile
|
20 |
|
21 |
# Iniciar o servidor Ollama, baixar o modelo e manter o servidor em execução
|
22 |
+
RUN ollama serve & sleep 5 && ollama pull lucianotonet/llamaclaude && pkill ollama
|
23 |
|
24 |
# Expor a porta do Ollama
|
25 |
+
EXPOSE 11434
|
26 |
+
|
27 |
+
CMD ["serve"]
|