-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.py
55 lines (40 loc) · 1.55 KB
/
setup.py
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# -*- coding: utf-8 -*-
# JARVIS Chatbot - a simple RAG with PDF files
# Create: 03 July 2024
# Author: Mr.Jack _ www.bicweb.vn
# Version: 0.1.5
# Date: 19 December 2024 - 10 AM
import os
print("\npython3 -m pip install --upgrade pip")
os.system('python3 -m pip install --upgrade pip')
# https://pipx.pypa.io/latest/
print("\npython3 -m pip install pipx")
os.system("python3 -m pip install pipx")
# https://python-poetry.org/docs/
print("\npipx install poetry")
os.system("pipx install poetry")
print("\npoetry self update")
os.system("poetry self update")
print("\npoetry update")
os.system("poetry update")
# Delelte Chroma vectorstore ------------------------------------------------------------
import os.path
import shutil
path_to_folder = "chroma_vectorstore"
folder_exists = os.path.exists(path_to_folder)
if folder_exists:
shutil.rmtree(path_to_folder)
print("\n",path_to_folder,"is deleted")
# Install needed packages ------------------------------------------------------------
# print("\npython -m pip install -Ur requirements.txt")
# os.system("python -m pip install -Ur requirements.txt")
print("\npoetry install")
os.system("poetry install")
# Pull ollama Qwen2-7B model ------------------------------------------------------------
import ollama
print("\nollama pull nomic-embed-text") # Nomic Embed v1.5 Embedding
ollama.pull('nomic-embed-text')
# print("\nollama pull chroma/all-minilm-l6-v2-f32")
# ollama.pull('chroma/all-minilm-l6-v2-f32')
print("\nollama pull qwen2.5\n")
ollama.pull('qwen2.5')