Spaces:
Build error
Build error
- 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 |
-
#
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
-
# The base image's default command
|
| 29 |
-
#
|
| 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.
|
|
|