Update Dockerfile
Browse files- Dockerfile +12 -11
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
# 1. Use Python 3.
|
| 2 |
-
FROM python:3.
|
| 3 |
|
| 4 |
# 2. Set up user
|
| 5 |
RUN useradd -m -u 1000 user
|
|
@@ -8,25 +8,26 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 8 |
WORKDIR /home/user/app
|
| 9 |
|
| 10 |
# 3. Install System Dependencies
|
|
|
|
| 11 |
USER root
|
| 12 |
RUN apt-get update && apt-get install -y \
|
| 13 |
libopenblas-dev \
|
| 14 |
libgomp1 \
|
| 15 |
-
git \
|
| 16 |
-
wget \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
USER user
|
| 19 |
|
| 20 |
-
# 4.
|
|
|
|
|
|
|
| 21 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 22 |
-
pip install --no-cache-dir
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
"protobuf==3.20.3"
|
| 26 |
|
| 27 |
-
# 5. Install Llama-cpp-python
|
|
|
|
| 28 |
RUN pip install --no-cache-dir \
|
| 29 |
-
https://
|
| 30 |
|
| 31 |
# 6. Copy App Code
|
| 32 |
COPY --chown=user . .
|
|
|
|
| 1 |
+
# 1. Use Python 3.13 (Matches your GitHub Wheel)
|
| 2 |
+
FROM python:3.13-slim
|
| 3 |
|
| 4 |
# 2. Set up user
|
| 5 |
RUN useradd -m -u 1000 user
|
|
|
|
| 8 |
WORKDIR /home/user/app
|
| 9 |
|
| 10 |
# 3. Install System Dependencies
|
| 11 |
+
# We keep these because llama-cpp still needs the shared libraries to run
|
| 12 |
USER root
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
libopenblas-dev \
|
| 15 |
libgomp1 \
|
|
|
|
|
|
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
USER user
|
| 18 |
|
| 19 |
+
# 4. Install Gradio and other tools
|
| 20 |
+
# I removed the "force-reinstall" of old versions since 3.13 is new
|
| 21 |
+
# and works better with the latest versions.
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip && \
|
| 23 |
+
pip install --no-cache-dir \
|
| 24 |
+
gradio \
|
| 25 |
+
huggingface-hub
|
|
|
|
| 26 |
|
| 27 |
+
# 5. Install YOUR Llama-cpp-python Wheel
|
| 28 |
+
# I updated this to the link from your screenshot
|
| 29 |
RUN pip install --no-cache-dir \
|
| 30 |
+
https://github.com/Jameson040/my_lama-wheels/releases/download/v0.1/llama_cpp_python-0.3.16-cp313-cp313-linux_x86_64.whl
|
| 31 |
|
| 32 |
# 6. Copy App Code
|
| 33 |
COPY --chown=user . .
|