File size: 930 Bytes
ccbabe0
 
32ea06e
 
 
 
 
 
 
ccbabe0
 
 
 
 
 
 
3cc53ec
ccbabe0
 
3cc53ec
c47e3b0
ccbabe0
 
 
 
 
3cc53ec
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
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Install system dependencies for building Python packages
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential \
    cmake \
    git \
    && rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Install any needed packages specified in requirements.txt
RUN pip install  fastapi uvicorn llama-cpp-python pydantic

# Download the model using Hugging Face CLI
RUN pip install  huggingface_hub \
    && huggingface-cli download legraphista/Qwen2-1.5B-Instruct-IMat-GGUF Qwen2-1.5B-Instruct.IQ3_M.gguf --local-dir . --local-dir-use-symlinks False

# Make port 8000 available to the world outside this container
EXPOSE 8000

# Run the server
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]