File size: 505 Bytes
b0a18d0
06bbd1d
b0a18d0
 
 
 
 
 
06bbd1d
5c6e5ec
b0a18d0
 
 
 
 
b216cb2
b0a18d0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import subprocess

def run_command(command):
    try:
        result = subprocess.run(command, shell=True, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        print(f"Success: {result.stdout}")
    except subprocess.CalledProcessError as e:
        print(f"Error: {e.stderr}")

def main():
    # Install script
    run_command("curl -fsSL https://ollama.com/install.sh | sh")
    
    # Start Ollama server
    run_command("ollama serve")

if __name__ == "__main__":
    main()