File size: 530 Bytes
615a1d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import subprocess
import sys

def install(package):
    subprocess.check_call([sys.executable, "-m", "pip", "install", package])

def setup_environment():
    print("Installing required packages...")
    install('git+https://github.com/unslothai/unsloth.git#egg=unsloth[colab-new]')
    install('--no-deps xformers')
    install('trl<0.9.0')
    install('peft')
    install('accelerate')
    install('bitsandbytes')
    print("Packages installed successfully.")

if __name__ == "__main__":
    setup_environment()