File size: 983 Bytes
6647f42
145da04
 
 
 
 
 
 
 
 
 
6647f42
145da04
 
 
 
6647f42
145da04
 
 
 
6647f42
145da04
6647f42
145da04
6647f42
145da04
 
6647f42
145da04
 
6647f42
 
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
# Dockerfile
FROM python:3.10-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    wget \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Install llama-cpp-python from its prebuilt wheel index for CPU
RUN pip install --no-cache-dir \
    --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \
    llama-cpp-python==0.2.24

# Copy and install Python requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# Download the NEW model file
RUN wget --progress=bar:force:noscroll -O zephyr-quiklang-3b-4k.Q4_K_M.gguf \
  https://huggingface.co/TheBloke/zephyr-quiklang-3b-4K-GGUF/resolve/main/zephyr-quiklang-3b-4k.Q4_K_M.gguf

# Copy the API application file
COPY api.py .

# Expose the port Hugging Face uses
EXPOSE 7860

# Command to run the Uvicorn server on the public port
CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"]