File size: 927 Bytes
f320c9a
1d03122
0549216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1d03122
 
0549216
 
 
 
36a354b
 
 
9625980
36a354b
 
 
 
0549216
 
 
 
 
 
 
1d03122
 
 
0549216
1d03122
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM python:3.11-slim

RUN apt-get update && apt-get install -y \
    git \
    git-lfs \
    ffmpeg \
    libsm6 \
    libxext6 \
    cmake \
    rsync \
    libgl1 \
    g++ \
    gcc \
    build-essential \
    && rm -rf /var/lib/apt/lists/* \
    && git lfs install

RUN useradd -m -u 1000 user

WORKDIR /app

ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT="7860"

RUN pip install --no-cache-dir --upgrade pip
# Download model using wget directly (no token needed for public models)
RUN apt-get update && apt-get install -y wget && \
    wget -q --show-progress \
    "https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/main/qwen2.5-0.5b-instruct-q4_k_m.gguf" \
    -O /app/model.gguf && \
    echo "✅ Model size: $(du -sh /app/model.gguf)"



COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY --chown=user:user . /app

USER user

EXPOSE 7860


CMD ["python", "app.py"]