|
FROM python:3.10-slim |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
build-essential \ |
|
cmake \ |
|
git \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
ENV HF_HOME=/tmp/huggingface_cache |
|
|
|
|
|
RUN git clone https://github.com/ggerganov/llama.cpp /app/llama.cpp |
|
|
|
|
|
WORKDIR /app/llama.cpp |
|
RUN mkdir -p build && cd build && cmake .. && make |
|
|
|
|
|
WORKDIR /app |
|
COPY requirements.txt . |
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
|
|
|
RUN mkdir -p $HF_HOME && chmod -R 777 $HF_HOME |
|
|
|
|
|
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"] |
|
|