You have all likely just completed a day of container and Docker training and now you are wondering what you can do with this newfound super power.
How about deploying your own private "ChatGPT" complete with a locally running Large Language Model and a ChatGPT like Web UI.
This challenge will work through a few of the steps that you learned in the class and show you what is now possible that you have these skills.
Let's get started!
- Open the
./ollama
folder in this repo and copy the contents of thedocker-compose.yml
file - Log into you lab server and start a new lab environment
- In the terminal, type
mkdir ollama
cd
into the Ollama directory and runnano docker-compose.yml
- Paste in your copy of the
docker-compose.yml
file from step 1 - Press
Ctrl+X
to exit andY
to save the file - Run
docker compose up -d
to start the Ollama server - Run
curl http://YOUR-SERVER-IP:11434
in a the terminal window and it should respond with "Ollama is running!"
- In the terminal window run
docker exec -it ollama ollama pull gemma:2b
- Once the download completes run
docker exec -it ollama ollama ls
and confirm you see thegemma:2b
model listed
- Open the
./open-webui
folder in this repo and copy the contents of thedocker-compose.yml
file - In the terminal, type
mkdir open-webui
cd
into the OpenWebUI directory and runnano docker-compose.yml
- Paste in your copy of the
docker-compose.yml
file from step 1. - Modify the
OLLAMA_URL
environment variable to point to your Ollama server. It should look likeOLLAMA_URL=http://YOUR-SERVER-IP:11434
- Press
Ctrl+X
to exit andY
to save the file - Run
docker compose up -d
to start the OpenWebUI server - Open a web browser and navigate to
http://YOUR-SERVER-IP:8080
and you should see the OpenWebUI login page - Create an account and login
- You should now see the OpenWebUI dashboard. Select the
gemma:2b
model at the top of the screen and ask it a question in the message box at the bottom of the screen. (The response will be slow as this is only running on a small server and using CPU instead of GPU).
Congratulations! You have now deployed your own private "ChatGPT" like AI model and Web UI.