Skip to content

Commit

Permalink
Merge pull request #151 from ufal/docker-ollama-docker-service
Browse files Browse the repository at this point in the history
fix factgenie launch; add ollama service to docker-compose
  • Loading branch information
kasnerz authored Nov 12, 2024
2 parents fd2146f + a652e54 commit 0e01cfc
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ RUN cp /usr/src/factgenie/factgenie/config/config_TEMPLATE.yml /usr/src/factgeni
RUN pip install -e .[deploy]

EXPOSE 80
ENTRYPOINT ["gunicorn", "--env", "SCRIPT_NAME=", "-b", ":80", "-w", "1", "--threads", "8", "factgenie.cli:create_app()"]
ENTRYPOINT ["gunicorn", "--env", "SCRIPT_NAME=", "-b", ":80", "-w", "1", "--threads", "8", "factgenie.bin.run:create_app()"]
23 changes: 22 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
# YOU NEED run once `curl http://localhost:11434/api/pull -d '{"name": "llama3.1:8b"}'`
# after running `docker-compose up -d` from the repo root directory
# in order to download the llama3.1:8b model which is the default model
# we use in the example configurations for factgenie
services:
factgenie:
container_name: factgenie
image: factgenie
restart: on-failure
ports:
- 8890:80
build: ./factgenie
build: ./

# Factgenie connects to LLM inference servers either OpenAI client or Ollama
# Demonstrates running ollama on CPU
# For GPU run ollama without Docker
# or look at https://hub.docker.com/r/ollama/ollama and follow the GPU instructions
ollama:
container_name: ollama
image: ollama/ollama
restart: on-failure
# We need to expose the port to your machine because you need to pull models for ollama
# before factgenie queries the ollama server to run inference for the model.
# E.g. curl http://localhost:11434/api/pull -d '{"name": "llama3.1:8b"}' to download the factgenie default LLM.
ports:
- 11434:11434



0 comments on commit 0e01cfc

Please sign in to comment.