Zack Saadioui
8/27/2024
1
curl -fsSL https://ollama.com/install.sh | sh
1
ollama pull llama3.1
1
ollama serve
1
.github/workflows/
1
ollama_workflow.yml
1
ollama_workflow.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
name: Ollama Workflow on: push: branches: - main pull_request: branches: - main jobs: ollama: runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v2 - name: Install Ollama run: curl -fsSL https://ollama.com/install.sh | sh - name: Run Ollama run: | ollama serve & sleep 5 # wait for the Ollama server to be ready - name: Call Ollama API run: | curl -d '{ "model": "llama3.1", "prompt": "Why is the sky blue?" }' \ -H 'Content-Type: application/json' \ http://localhost:11434/api/generate
1
main
1
Actions
1
ollama serve
1
sleep
1
serve
Copyright © Arsturn 2024