Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix factgenie launch; add ollama service to docker-compose #151

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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



Loading