py-rus commited on
Commit
8a97d19
·
verified ·
1 Parent(s): 125c5bc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -3
Dockerfile CHANGED
@@ -1,7 +1,19 @@
1
- FROM python:3.14-slim
2
- RUN apt-get update && apt-get install -y build-essential cmake && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
3
  WORKDIR /app
4
  COPY . .
5
- RUN pip install --no-cache-dir streamlit llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
 
 
 
 
 
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"]