Spaces:
Sleeping
Sleeping
Udate Dockerfilr
Browse filesFixing runtime error from pulling model from ollama registry
- Dockerfile +26 -26
Dockerfile
CHANGED
|
@@ -1,27 +1,27 @@
|
|
| 1 |
-
FROM python:3.11-slim
|
| 2 |
-
|
| 3 |
-
WORKDIR /app
|
| 4 |
-
|
| 5 |
-
# 1. Install System Tools & Curl
|
| 6 |
-
RUN apt-get update && apt-get install -y \
|
| 7 |
-
build-essential \
|
| 8 |
-
curl \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
-
|
| 11 |
-
# 2. Install Ollama (The actual software)
|
| 12 |
-
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 13 |
-
|
| 14 |
-
# 3. Install Python Deps
|
| 15 |
-
COPY requirements.txt .
|
| 16 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
-
|
| 18 |
-
# 4. Copy Code
|
| 19 |
-
COPY . .
|
| 20 |
-
|
| 21 |
-
# 5. Start Ollama in background, Pull Model, then Run Streamlit
|
| 22 |
-
# We use a wrapper script to ensure Ollama starts before the app
|
| 23 |
-
CMD ollama serve & \
|
| 24 |
-
sleep 5 && \
|
| 25 |
-
ollama pull llama3.2:3b && \
|
| 26 |
-
ollama pull hf.co/CompendiumLabs/bge-base-en-v1.5-gguf && \
|
| 27 |
streamlit run app.py --server.port 7860 --server.address 0.0.0.0
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# 1. Install System Tools & Curl
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
build-essential \
|
| 8 |
+
curl \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
+
|
| 11 |
+
# 2. Install Ollama (The actual software)
|
| 12 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 13 |
+
|
| 14 |
+
# 3. Install Python Deps
|
| 15 |
+
COPY requirements.txt .
|
| 16 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
+
|
| 18 |
+
# 4. Copy Code
|
| 19 |
+
COPY . .
|
| 20 |
+
|
| 21 |
+
# 5. Start Ollama in background, Pull Model, then Run Streamlit
|
| 22 |
+
# We use a wrapper script to ensure Ollama starts before the app
|
| 23 |
+
CMD ollama serve & \
|
| 24 |
+
sleep 5 && \
|
| 25 |
+
ollama pull llama3.2:3b && \
|
| 26 |
+
ollama pull hf.co/CompendiumLabs/bge-base-en-v1.5-gguf && \
|
| 27 |
streamlit run app.py --server.port 7860 --server.address 0.0.0.0
|