Skip to content

Commit

Permalink
feat(docker): set default Docker to use Ollama (#1812)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrepetto-certx authored Apr 1, 2024
1 parent 087cb0b commit f83abff
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.external
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
9 changes: 6 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions settings-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: /

0 comments on commit f83abff

Please sign in to comment.