Update Dockerfile
Browse files- Dockerfile +12 -1
Dockerfile
CHANGED
|
@@ -1,13 +1,24 @@
|
|
| 1 |
FROM python:3.11-slim
|
|
|
|
| 2 |
RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
|
|
| 3 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
|
|
|
| 4 |
WORKDIR /app
|
|
|
|
| 5 |
COPY requirements.txt .
|
| 6 |
COPY app.py .
|
| 7 |
COPY database.py .
|
|
|
|
| 8 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 9 |
EXPOSE 7860
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
HEALTHCHECK --interval=30s CMD curl -f http://localhost:7860/health || exit 1
|
|
|
|
| 12 |
ENV OLLAMA_NUM_PARALLEL=3
|
|
|
|
| 13 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
+
|
| 3 |
RUN apt-get update && apt-get install -y curl ca-certificates && rm -rf /var/lib/apt/lists/*
|
| 4 |
+
|
| 5 |
RUN curl -fsSL https://ollama.com/install.sh | sh
|
| 6 |
+
|
| 7 |
WORKDIR /app
|
| 8 |
+
|
| 9 |
COPY requirements.txt .
|
| 10 |
COPY app.py .
|
| 11 |
COPY database.py .
|
| 12 |
+
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
+
|
| 15 |
EXPOSE 7860
|
| 16 |
+
|
| 17 |
+
# CORRIGIDO: phi3.5 → phi3
|
| 18 |
+
RUN ollama serve & sleep 25 && ollama pull phi3:mini-4k-instruct-q4_0 && kill $!
|
| 19 |
+
|
| 20 |
HEALTHCHECK --interval=30s CMD curl -f http://localhost:7860/health || exit 1
|
| 21 |
+
|
| 22 |
ENV OLLAMA_NUM_PARALLEL=3
|
| 23 |
+
|
| 24 |
CMD ["python", "app.py"]
|