Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +15 -3
Dockerfile
CHANGED
|
@@ -1,7 +1,19 @@
|
|
| 1 |
-
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
COPY . .
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
EXPOSE 7860
|
|
|
|
| 7 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
# Use 3.12 for the build (3.14 is currently too heavy for the Free Tier compiler)
|
| 2 |
+
FROM python:3.12-slim
|
| 3 |
+
|
| 4 |
+
# Install ONLY what is strictly necessary
|
| 5 |
+
RUN apt-get update && apt-get install -y \
|
| 6 |
+
build-essential \
|
| 7 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
+
|
| 9 |
WORKDIR /app
|
| 10 |
COPY . .
|
| 11 |
+
|
| 12 |
+
# CRITICAL: We use a PRE-COMPILED wheel to avoid the OOM (Out Of Memory) error
|
| 13 |
+
RUN pip install --no-cache-dir streamlit
|
| 14 |
+
RUN pip install --no-cache-dir llama-cpp-python \
|
| 15 |
+
--extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
|
| 16 |
+
|
| 17 |
EXPOSE 7860
|
| 18 |
+
|
| 19 |
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
|