diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 index ce635b9dfabcb42013a900788bd502411086fba2..3d427c01f4ccfab1f058dc580bae3cf9d020aee6 --- a/Dockerfile +++ b/Dockerfile @@ -9,13 +9,10 @@ RUN apt-get update && apt-get install -y \ software-properties-common \ && rm -rf /var/lib/apt/lists/* -# Copy requirements first to leverage Docker cache COPY requirements.txt . -# Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt -# Copy the rest of the application COPY . . # Expose the port Streamlit runs on diff --git a/Dockerfile.ollama b/Dockerfile.ollama new file mode 100644 index 0000000000000000000000000000000000000000..00d9f00b9cafc7839e03175360162981fa953571 --- /dev/null +++ b/Dockerfile.ollama @@ -0,0 +1,9 @@ +FROM ollama/ollama:latest + +RUN echo '#!/bin/sh\n\ +ollama serve &\n\ +sleep 5\n\ +ollama pull nomic-embed-text\n\ +wait' > /init.sh && chmod +x /init.sh + +CMD ["/init.sh"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml old mode 100644 new mode 100755 index 6ce1d47f2f352139f4cef0847c6f52d9554f520d..34c2ecb90a58b9cebc4e13ec214c7306ad25a288 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,3 +1,5 @@ +# docker-compose.yml + version: '3.8' services: @@ -15,7 +17,9 @@ services: - ollama ollama: - image: ollama/ollama + build: + context: . + dockerfile: Dockerfile.ollama ports: - "11434:11434" volumes: