Spaces:
Running
Running
Rachit-Mangawa commited on
Commit ·
d3dc97d
1
Parent(s): 7f971bd
fix(deploy): use official ollama install script to fix 404 binary error
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
|
@@ -3,9 +3,8 @@ FROM python:3.10-slim
|
|
| 3 |
# System setup
|
| 4 |
RUN apt-get update && apt-get install -y curl procps && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
-
# Install Ollama
|
| 7 |
-
RUN curl -
|
| 8 |
-
chmod +x /usr/bin/ollama
|
| 9 |
|
| 10 |
WORKDIR /app
|
| 11 |
COPY requirements.txt .
|
|
@@ -19,7 +18,7 @@ ENV OLLAMA_HOST=127.0.0.1:11434
|
|
| 19 |
ENV PYTHONUNBUFFERED=1
|
| 20 |
|
| 21 |
# Execution Script: Starts Ollama, pulls Phi, starts App
|
| 22 |
-
RUN echo '#!/bin/bash\nollama serve & sleep
|
| 23 |
chmod +x /app/run.sh
|
| 24 |
|
| 25 |
EXPOSE 8086
|
|
|
|
| 3 |
# System setup
|
| 4 |
RUN apt-get update && apt-get install -y curl procps && rm -rf /var/lib/apt/lists/*
|
| 5 |
|
| 6 |
+
# Install Ollama via official script (More robust than direct binary link)
|
| 7 |
+
RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
|
|
| 8 |
|
| 9 |
WORKDIR /app
|
| 10 |
COPY requirements.txt .
|
|
|
|
| 18 |
ENV PYTHONUNBUFFERED=1
|
| 19 |
|
| 20 |
# Execution Script: Starts Ollama, pulls Phi, starts App
|
| 21 |
+
RUN echo '#!/bin/bash\nollama serve & sleep 10 && ollama pull phi3.5 && python app.py' > /app/run.sh && \
|
| 22 |
chmod +x /app/run.sh
|
| 23 |
|
| 24 |
EXPOSE 8086
|