Spaces:
Configuration error
Configuration error
Update Dockerfile
Browse files- Dockerfile +2 -27
Dockerfile
CHANGED
@@ -1,28 +1,3 @@
|
|
1 |
-
|
2 |
-
FROM python:3.8-slim
|
3 |
|
4 |
-
|
5 |
-
WORKDIR /app
|
6 |
-
|
7 |
-
# Install system dependencies, curl, and other necessary utilities
|
8 |
-
RUN apt-get update && apt-get install -y \
|
9 |
-
curl \
|
10 |
-
&& pip install --upgrade pip
|
11 |
-
|
12 |
-
# Install Ollama
|
13 |
-
RUN curl -sSL https://ollama.com/install.sh | bash
|
14 |
-
|
15 |
-
# Expose the port for the model server (assuming default port 5000)
|
16 |
-
EXPOSE 5000
|
17 |
-
|
18 |
-
# Start Ollama service, pull the model, and then serve it
|
19 |
-
CMD /bin/bash -c "
|
20 |
-
# Start the Ollama service in the foreground
|
21 |
-
ollama & \
|
22 |
-
# Wait for Ollama to be ready
|
23 |
-
sleep 10 && \
|
24 |
-
# Pull the llama-3.2 model
|
25 |
-
ollama pull llama-3.2 && \
|
26 |
-
# Start serving the model
|
27 |
-
ollama serve --model llama-3.2 --port 5000
|
28 |
-
"
|
|
|
1 |
+
FROM ollama/ollama
|
|
|
2 |
|
3 |
+
COPY ./pull-llama3.sh /pull-llama3.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|