|
|
|
FROM python:3.11-slim |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
curl \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN curl -fsSL https://ollama.com/install.sh | sh |
|
|
|
|
|
COPY requirements.txt . |
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
COPY . . |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENV OLLAMA_HOST=0.0.0.0 |
|
ENV OLLAMA_PORT=11434 |
|
|
|
|
|
CMD bash -c "ollama serve & sleep 10 && ollama pull hf.co/bartowski/Llama-3.2-1B-Instruct-GGUF:Llama-3.2-1B-Instruct-Q8_0.gguf && streamlit run app.py --server.port 7860 --server.address 0.0.0.0" |