OrbitMC commited on
Commit
7549ba3
·
verified ·
1 Parent(s): e7b5bc2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -32
Dockerfile CHANGED
@@ -4,44 +4,25 @@ FROM ubuntu:22.04
4
  RUN apt-get update && \
5
  apt-get install -y \
6
  build-essential \
7
- libssl-dev \
8
- zlib1g-dev \
9
- libboost-all-dev \
10
- libopenblas-dev \
11
- libomp-dev \
12
  cmake \
13
- pkg-config \
14
  git \
15
- python3-pip \
16
- curl \
17
- wget && \
18
  rm -rf /var/lib/apt/lists/*
19
-
20
- # Install Python dependencies with transfer acceleration
21
- RUN pip3 install huggingface-hub[hf_transfer] openai gradio duckduckgo-search
22
-
23
- # Build llama.cpp
24
- RUN git clone https://github.com/ggerganov/llama.cpp && \
25
- cd llama.cpp && \
26
- cmake -B build -S . -DLLAMA_BUILD_SERVER=ON -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS -DCMAKE_BUILD_TYPE=Release && \
27
- cmake --build build --config Release --target llama-server -j $(nproc)
28
 
29
- # Download from official Qwen GGUF repo
30
- # We target the Q8_0 file for high precision
31
- RUN mkdir -p /models && \
32
- HF_HUB_ENABLE_HF_TRANSFER=1 huggingface-cli download \
33
- Qwen/Qwen3-0.6B-GGUF \
34
- --include "*q8_0.gguf" \
35
- --local-dir /models \
36
- --local-dir-use-symlinks False
37
 
38
- # Rename the file to a standard name for our startup script
39
- RUN find /models -name "*.gguf" -exec mv {} /models/model.gguf \;
 
 
40
 
 
41
  COPY app.py /app.py
42
- COPY start.sh /start.sh
43
- RUN chmod +x /start.sh
44
 
45
- EXPOSE 7860 8080
 
46
 
47
- CMD ["/start.sh"]
 
 
4
  RUN apt-get update && \
5
  apt-get install -y \
6
  build-essential \
7
+ python3-pip \
 
 
 
 
8
  cmake \
 
9
  git \
10
+ curl && \
 
 
11
  rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
 
 
12
 
13
+ # Set environment variables for faster downloads
14
+ ENV HF_HUB_ENABLE_HF_TRANSFER=1
 
 
 
 
 
 
15
 
16
+ # Install Python dependencies
17
+ # llama-cpp-python will be compiled during install
18
+ RUN pip3 install --upgrade pip && \
19
+ pip3 install llama-cpp-python huggingface-hub[hf_transfer] gradio duckduckgo-search
20
 
21
+ # Copy the application code
22
  COPY app.py /app.py
 
 
23
 
24
+ # Expose the Gradio port
25
+ EXPOSE 7860
26
 
27
+ # Run the script directly
28
+ CMD ["python3", "/app.py"]