rahul7star commited on
Commit
848b5de
·
verified ·
1 Parent(s): b784fde

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -26
Dockerfile CHANGED
@@ -4,47 +4,32 @@ ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PYTHONUNBUFFERED=1
5
  ENV PIP_NO_CACHE_DIR=1
6
 
7
- # -------- Model config --------
8
- # Change these to your GGUF repo + file
9
  ENV MODEL_REPO_ID="rahul7star/Qwen3-4B-Thinking-2509-Genius-Coder-AI-Full"
10
  ENV MODEL_FILENAME="rahul7star_Qwen3-4B-Thinking-2509-Genius-Coder-AI-Full-Q5_K_M.gguf"
11
- ENV MODEL_NAME="hf.co/rahul7star/Qwen3-4B-Thinking-2509-Genius-Coder-AI-Full:Q5_K_M"
12
- # Cache/model dirs
13
  ENV HF_HOME="/data/.cache/huggingface"
14
  ENV HUGGINGFACE_HUB_CACHE="/data/.cache/huggingface"
15
  ENV MODEL_CACHE_DIR="/data/models"
16
-
17
- # App port for HF Spaces
18
- ENV PORT=7860
19
 
20
  RUN apt-get update && apt-get install -y --no-install-recommends \
21
  python3 \
22
  python3-pip \
23
  python3-venv \
24
- build-essential \
25
- git \
26
  curl \
27
  ca-certificates \
28
- libopenblas-dev \
29
  && rm -rf /var/lib/apt/lists/*
30
 
31
- WORKDIR /workspace
32
-
33
- COPY . /workspace/
34
 
35
- RUN python3 -m pip install --upgrade pip setuptools wheel && \
36
- pip3 install \
37
- gradio==4.44.1 \
38
- fastapi==0.112.2 \
39
- starlette==0.38.6 \
40
- pydantic==2.8.2 \
41
- pydantic_core==2.20.1 \
42
- "llama-cpp-python==0.2.90" \
43
- "huggingface_hub==0.23.5"
44
 
45
- RUN chmod +x /workspace/entrypoint.sh && \
46
- mkdir -p /data /workspace/data /data/models /data/.cache/huggingface
 
47
 
48
- EXPOSE 7860
 
49
 
50
- CMD ["bash", "/workspace/entrypoint.sh"]
 
4
  ENV PYTHONUNBUFFERED=1
5
  ENV PIP_NO_CACHE_DIR=1
6
 
 
 
7
  ENV MODEL_REPO_ID="rahul7star/Qwen3-4B-Thinking-2509-Genius-Coder-AI-Full"
8
  ENV MODEL_FILENAME="rahul7star_Qwen3-4B-Thinking-2509-Genius-Coder-AI-Full-Q5_K_M.gguf"
 
 
9
  ENV HF_HOME="/data/.cache/huggingface"
10
  ENV HUGGINGFACE_HUB_CACHE="/data/.cache/huggingface"
11
  ENV MODEL_CACHE_DIR="/data/models"
12
+ ENV LLAMA_SERVER_URL="http://127.0.0.1:8000"
13
+ ENV PORT="7860"
 
14
 
15
  RUN apt-get update && apt-get install -y --no-install-recommends \
16
  python3 \
17
  python3-pip \
18
  python3-venv \
 
 
19
  curl \
20
  ca-certificates \
21
+ git \
22
  && rm -rf /var/lib/apt/lists/*
23
 
24
+ COPY --from=ghcr.io/ggml-org/llama.cpp:server /app/llama-server /usr/local/bin/llama-server
 
 
25
 
26
+ WORKDIR /workspace
 
 
 
 
 
 
 
 
27
 
28
+ COPY requirements.txt /workspace/requirements.txt
29
+ RUN pip3 install --no-cache-dir -r requirements.txt
30
+ RUN pip3 install --no-cache-dir requests huggingface_hub gradio
31
 
32
+ COPY . /workspace
33
+ RUN chmod +x /workspace/entrypoint.sh
34
 
35
+ CMD ["/workspace/entrypoint.sh"]