FROM swipl RUN apt-get update RUN apt-get install -y gcc python3-all python3-dev python3-venv RUN curl -fsSL https://ollama.com/install.sh | sh RUN ollama pull mxbai-embed-large WORKDIR /app COPY . /app RUN python3 -m venv /app/env ENV PATH="/app/env/bin:$PATH" RUN pip install --no-cache-dir --upgrade pip RUN pip install --no-cache-dir --upgrade -r requirements.txt RUN touch tmp.pl && chmod 666 tmp.pl EXPOSE 7860 ENV GRADIO_SERVER_NAME="0.0.0.0" CMD ["ollama", "serve" ,"&", "python", "app.py"]