kirikir13 commited on
Commit
cfc8ae7
·
verified ·
1 Parent(s): 5d5def1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -11
Dockerfile CHANGED
@@ -1,17 +1,42 @@
1
- FROM huggingface/zero-gpu-gradio:latest
2
 
3
- # --- STEP 1: llama-cpp-python prebuilt CUDA wheel FIRST ---
4
- # This MUST happen before any other pip install or it compiles from source
5
- RUN pip install --no-cache-dir llama-cpp-python \
6
- --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu124
7
 
8
- # --- STEP 2: everything else ---
9
- COPY requirements.txt /tmp/requirements.txt
10
- RUN pip install --no-cache-dir -r /tmp/requirements.txt
 
 
 
 
 
 
 
 
11
 
12
- # --- STEP 3: file parsers ---
13
- RUN pip install --no-cache-dir python-docx pdfplumber chardet
14
 
15
- COPY app.py /home/user/app/app.py
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  CMD ["python", "app.py"]
 
1
+ FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
2
 
3
+ ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV PYTHONUNBUFFERED=1
5
+ ENV CMAKE_ARGS="-DLLAMA_CUDA=on -DGGML_CUDA=on"
6
+ ENV FORCE_CMAKE=1
7
 
8
+ RUN apt-get update && apt-get install -y \
9
+ python3-pip \
10
+ python3-dev \
11
+ python3-venv \
12
+ git \
13
+ git-lfs \
14
+ wget \
15
+ build-essential \
16
+ cmake \
17
+ && rm -rf /var/lib/apt/lists/* \
18
+ && git lfs install
19
 
20
+ WORKDIR /app
 
21
 
22
+ # Install deps minus llama-cpp-python
23
+ COPY requirements.txt /app/requirements-temp.txt
24
+ RUN grep -v "llama-cpp-python" /app/requirements-temp.txt > /app/requirements.txt && \
25
+ pip install --no-cache-dir -r requirements.txt
26
+
27
+ # Install llama-cpp-python with CUDA wheel fallback
28
+ RUN pip install --no-cache-dir \
29
+ llama-cpp-python \
30
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cu121 \
31
+ || pip install --no-cache-dir llama-cpp-python
32
+
33
+ COPY . /app
34
+
35
+ EXPOSE 7860
36
+
37
+ ENV MODEL_REPO=DavidAU/Qwen3.6-27B-Heretic-Uncensored-FINETUNE-NEO-CODE-Di-IMatrix-MAX-GGUF
38
+ ENV MODEL_FILE=Qwen3.6-27B-NEO-CODE-HERE-2T-OT-Q4_K_M.gguf
39
+ ENV N_CTX=4096
40
+ ENV N_GPU_LAYERS=-1
41
 
42
  CMD ["python", "app.py"]