File size: 725 Bytes
0087419
 
8e11c77
8e89f47
 
0087419
8e89f47
8e11c77
0087419
8da3f0d
9542e10
8da3f0d
 
9542e10
 
 
8da3f0d
9542e10
 
0087419
8e11c77
0087419
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.10-slim

ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH \
    PYTHONUNBUFFERED=1

RUN useradd -m -u 1000 user
WORKDIR $HOME/app

USER root
RUN apt-get update && apt-get install -y wget libopenblas-dev && rm -rf /var/lib/apt/lists/*
USER user

# Install dependencies
RUN pip install --no-cache-dir llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
RUN pip install --no-cache-dir gradio

# Direct download using wget (More stable for large GGUF files)
RUN wget https://huggingface.co/tensorblock/llama3.2-1b-Uncensored-GGUF/resolve/main/llama3.2-1b-Uncensored-Q4_K_M.gguf -O llama3.2-1b-Uncensored-Q4_K_M.gguf

COPY --chown=user . $HOME/app
CMD ["python", "app.py"]