PreethiCarmelBosco commited on
Commit
7f5331b
·
verified ·
1 Parent(s): c698c9d
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -22,9 +22,12 @@ RUN --mount=type=secret,id=HF_TOKEN \
22
  RUN echo "FROM /app/prem-1B-SQL.Q8_0.gguf" > /app/Modelfile
23
 
24
  # --- 5. Import the model into Ollama's registry ---
25
- # This makes the model available to serve
26
- RUN ollama create prem-sql-api -f /app/Modelfile
 
 
 
 
27
 
28
- # The base image's default command is "ollama serve",
29
- # which will automatically start the API server on port 11434.
30
- # It will also serve our newly created "prem-sql-api" model.
 
22
  RUN echo "FROM /app/prem-1B-SQL.Q8_0.gguf" > /app/Modelfile
23
 
24
  # --- 5. Import the model into Ollama's registry ---
25
+ # We start the server in the background (&), wait 5s for it to boot,
26
+ # then run the 'create' command. The 'ollama serve' process
27
+ # will automatically end when this RUN step completes.
28
+ RUN sh -c 'ollama serve & \
29
+ sleep 5 && \
30
+ ollama create prem-sql-api -f /app/Modelfile'
31
 
32
+ # The base image's default command ("ollama serve") will
33
+ # now run and serve the "prem-sql-api" model we just created.