GTO83/LLM_Quantization
0
1FROM python:3.10-slim
2
3# Install system dependencies
4RUN apt-get update && apt-get install -y \
5 build-essential \
6 cmake \
7 git \
8 && rm -rf /var/lib/apt/lists/*
9
10# Set environment variable for HF cache
11ENV HF_HOME=/tmp/huggingface_cache
12
13# Clone llama.cpp
14RUN git clone https://github.com/ggerganov/llama.cpp /app/llama.cpp
15
16# Build llama.cpp
17WORKDIR /app/llama.cpp
18RUN mkdir -p build && cd build && cmake .. && make
19
20# Set up Python environment
21WORKDIR /app
22COPY requirements.txt .
23RUN pip install --no-cache-dir -r requirements.txt
24
25# Copy your app code
26COPY . .
27
28# Ensure the cache directory exists
29RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME
30
31# Set the entrypoint
32CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]