Update Dockerfile
Browse files- Dockerfile +5 -2
Dockerfile
CHANGED
|
@@ -9,6 +9,9 @@ RUN apt-get update && apt-get install -y curl && \
|
|
| 9 |
curl -fsSL https://ollama.com/install.sh | sh && \
|
| 10 |
apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 11 |
|
|
|
|
|
|
|
|
|
|
| 12 |
# Copy the application files
|
| 13 |
COPY . /app
|
| 14 |
|
|
@@ -18,5 +21,5 @@ RUN pip install --no-cache-dir flask gunicorn
|
|
| 18 |
# Expose the required port
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
# Start Ollama and the Flask app
|
| 22 |
-
CMD bash -c "ollama pull llama3.2 && ollama serve & gunicorn -w 2 -b 0.0.0.0:7860 app.dip:app"
|
|
|
|
| 9 |
curl -fsSL https://ollama.com/install.sh | sh && \
|
| 10 |
apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# Ensure Ollama is in the $PATH (in case it's not set by the install script)
|
| 13 |
+
ENV PATH="/root/.local/bin:$PATH"
|
| 14 |
+
|
| 15 |
# Copy the application files
|
| 16 |
COPY . /app
|
| 17 |
|
|
|
|
| 21 |
# Expose the required port
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Start Ollama and the Flask app (ensure Ollama is ready before starting Flask)
|
| 25 |
+
CMD bash -c "ollama pull llama3.2 && ollama serve && gunicorn -w 2 -b 0.0.0.0:7860 app.dip:app"
|