This is a web app that allows users to summarize a text. It uses python, Docker, Flask and the Ollama API
Connection to DB using pgAdmin:
- log In
- add new connection
- General: Name = postgres
- Connection: Host = postgresql_container Port = 5432 Database = postgres Username = postgres Pass = Azerty123!!!
CREATING NETWORK (useless)
links:
- https://medium.com/@augustineozor/understanding-docker-bridge-network-6e499da50f65
- https://dockerlabs.collabnix.com/networking/A2-bridge-networking.html
- while docker is running: docker network create my-network
API OLLAMA
- docker-compose up --build
- go inside the container: docker exec -it ollama_container /bin/bash
- inside the container : ollama pull llama2 (4Gb)
- update: docker exec -it ollama_container apt-get update
- pull container: docker exec -it ollama_container apt-get install -y python3
or : after docker compouse up interminal : curl http://localhost:11434/api/pull -d '{ "name": "llama2" }'
testing promt:
- execute container flask
- curl http://ollama_container:11434/api/generate -d '{ "model": "llama2", "prompt": "Why is the sky blue?" }'