@@ -11,6 +11,20 @@ if [[ "$OSTYPE" == "darwin"* ]]; then
11
11
elif [[ " $OSTYPE " == " linux-gnu" * ]]; then
12
12
# Linux
13
13
MINICONDA_URL=" https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
14
+
15
+ # Check and install libcurl development package if not present
16
+ if command -v dpkg & > /dev/null; then
17
+ if ! dpkg -s libcurl4-openssl-dev & > /dev/null; then
18
+ echo " libcurl4-openssl-dev is not installed. Installing..."
19
+ sudo apt-get update
20
+ sudo apt-get install -y libcurl4-openssl-dev
21
+ else
22
+ echo " libcurl4-openssl-dev is already installed."
23
+ fi
24
+ else
25
+ echo " Non-Debian based Linux detected. Please ensure libcurl development libraries are installed."
26
+ fi
27
+
14
28
elif [[ " $OSTYPE " == " msys" || " $OSTYPE " == " win32" ]]; then
15
29
# Windows
16
30
MINICONDA_URL=" https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe"
@@ -44,7 +58,6 @@ if conda info --envs | grep -q $ENV_NAME; then
44
58
# Linux
45
59
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
46
60
fi
47
- # conda activate $ENV_NAME
48
61
else
49
62
echo " Creating new environment $ENV_NAME ..."
50
63
if [[ " $OSTYPE " == " darwin" * ]]; then
54
67
# Linux
55
68
conda create --name $ENV_NAME python=3.10 pytorch=2.3.0 cudatoolkit=11.8 -c pytorch -c nvidia -y
56
69
fi
57
- # conda activate $ENV_NAME
58
70
fi
59
71
60
- # source $HOME/miniconda/bin/activate $ENV_NAME
72
+ # Activate the environment
73
+ source $HOME /miniconda/bin/activate $ENV_NAME
74
+
75
+ # Install cmake via conda
76
+ echo " Installing cmake..."
77
+ conda install -y cmake
61
78
62
- # Get full path of pip
79
+ # Get full path of pip within the activated environment
63
80
PIP_FULL_PATH=$( conda run -n $ENV_NAME which pip)
64
81
65
- # Install other packages within the activated environment
66
- # Use PIP_FULL_PATH to run pip commands
82
+ # Install other packages within the activated environment using pip
67
83
$PIP_FULL_PATH install --upgrade pip
68
84
$PIP_FULL_PATH install " xformers==0.0.26.post1"
69
- $PIP_FULL_PATH install " unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git@4e570be9ae4ced8cdc64e498125708e34942befc "
85
+ $PIP_FULL_PATH install " unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git@038e6d4c8d40207a87297ab3aaf787c19b1006d1 "
70
86
$PIP_FULL_PATH install --no-deps " trl<0.9.0" peft accelerate bitsandbytes
87
+ $PIP_FULL_PATH install unsloth_zoo
88
+ $PIP_FULL_PATH install cut_cross_entropy
89
+ $PIP_FULL_PATH install sentencepiece protobuf datasets huggingface_hub hf_transfer
71
90
72
91
echo " Setup completed successfully!"
0 commit comments