diff --git a/Dockerfile.external b/Dockerfile.external index b56af5018..3e2530e09 100644 --- a/Dockerfile.external +++ b/Dockerfile.external @@ -14,7 +14,7 @@ FROM base as dependencies WORKDIR /home/worker/app COPY pyproject.toml poetry.lock ./ -RUN poetry install --extras "ui vector-stores-qdrant" +RUN poetry install --extras "ui vector-stores-qdrant llms-ollama embeddings-ollama" FROM base as app diff --git a/docker-compose.yaml b/docker-compose.yaml index 7129b1264..f12e1da95 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,13 +1,16 @@ services: private-gpt: build: - dockerfile: Dockerfile.local + dockerfile: Dockerfile.external volumes: - ./local_data/:/home/worker/app/local_data - - ./models/:/home/worker/app/models ports: - 8001:8080 environment: PORT: 8080 PGPT_PROFILES: docker - PGPT_MODE: llamacpp + PGPT_MODE: ollama + ollama: + image: ollama/ollama:latest + volumes: + - ./models:/root/.ollama diff --git a/settings-docker.yaml b/settings-docker.yaml index d71c4070a..cb85afdf8 100644 --- a/settings-docker.yaml +++ b/settings-docker.yaml @@ -19,6 +19,17 @@ sagemaker: llm_endpoint_name: ${PGPT_SAGEMAKER_LLM_ENDPOINT_NAME:} embedding_endpoint_name: ${PGPT_SAGEMAKER_EMBEDDING_ENDPOINT_NAME:} +ollama: + llm_model: ${PGPT_OLLAMA_LLM_MODEL:mistral} + embedding_model: ${PGPT_OLLAMA_EMBEDDING_MODEL:nomic-embed-text} + api_base: ${PGPT_OLLAMA_API_BASE:http://ollama:11434} + tfs_z: ${PGPT_OLLAMA_TFS_Z:1.0} + top_k: ${PGPT_OLLAMA_TOP_K:40} + top_p: ${PGPT_OLLAMA_TOP_P:0.9} + repeat_last_n: ${PGPT_OLLAMA_REPEAT_LAST_N:64} + repeat_penalty: ${PGPT_OLLAMA_REPEAT_PENALTY:1.2} + request_timeout: ${PGPT_OLLAMA_REQUEST_TIMEOUT:600.0} + ui: enabled: true path: /