Update Dockerfile
Browse files- Dockerfile +18 -19
Dockerfile
CHANGED
|
@@ -1,31 +1,30 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
-
build-essential
|
|
|
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
-
#
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
# Back to /app
|
| 18 |
-
WORKDIR /app
|
| 19 |
|
| 20 |
-
# Copy
|
| 21 |
COPY app.py .
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
|
| 25 |
-
https://huggingface.co/TheBloke/CapybaraHermes-2.5-Mistral-7B-GGUF/resolve/main/capybarahermes-2.5-mistral-7b.Q5_K_M.gguf
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
| 29 |
|
| 30 |
-
# Run the
|
| 31 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install system dependencies
|
| 6 |
RUN apt-get update && apt-get install -y \
|
| 7 |
+
build-essential \
|
| 8 |
+
cmake \
|
| 9 |
+
wget \
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# Copy requirements and install Python dependencies
|
| 13 |
+
COPY requirements.txt .
|
| 14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
|
| 16 |
+
# Download the model file
|
| 17 |
+
RUN wget -O capybarahermes-2.5-mistral-7b.Q5_K_M.gguf \
|
| 18 |
+
https://huggingface.co/TheBloke/CapybaraHermes-2.5-Mistral-7B-GGUF/resolve/main/capybarahermes-2.5-mistral-7b.Q5_K_M.gguf
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
# Copy application code
|
| 21 |
COPY app.py .
|
| 22 |
|
| 23 |
+
# Expose Streamlit port
|
| 24 |
+
EXPOSE 8501
|
|
|
|
| 25 |
|
| 26 |
+
# Health check
|
| 27 |
+
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 28 |
|
| 29 |
+
# Run the application
|
| 30 |
+
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|