Update Dockerfile
Browse files- Dockerfile +10 -8
Dockerfile
CHANGED
|
@@ -2,25 +2,27 @@ FROM python:3.13.5-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
| 8 |
curl \
|
| 9 |
git \
|
|
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Copy requirements and install
|
| 13 |
COPY requirements.txt ./
|
| 14 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
-
# Copy
|
| 17 |
COPY . .
|
| 18 |
|
| 19 |
-
#
|
| 20 |
-
|
| 21 |
|
| 22 |
-
#
|
| 23 |
-
|
|
|
|
| 24 |
|
| 25 |
-
#
|
| 26 |
-
ENTRYPOINT ["
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies AND install Ollama
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
build-essential \
|
| 8 |
curl \
|
| 9 |
git \
|
| 10 |
+
&& curl -fsSL https://ollama.com/install.sh | sh \
|
| 11 |
&& rm -rf /var/lib/apt/lists/*
|
| 12 |
|
| 13 |
# Copy requirements and install
|
| 14 |
COPY requirements.txt ./
|
| 15 |
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
+
# Copy all your application files
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
+
# Grant execution permissions to your new startup script
|
| 21 |
+
RUN chmod +x start.sh
|
| 22 |
|
| 23 |
+
# Expose Streamlit and Ollama ports
|
| 24 |
+
EXPOSE 7860
|
| 25 |
+
EXPOSE 11434
|
| 26 |
|
| 27 |
+
# Boot up using the script instead of just calling Streamlit directly
|
| 28 |
+
ENTRYPOINT ["./start.sh"]
|