-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_env.sh
More file actions
executable file
·45 lines (37 loc) · 1.38 KB
/
setup_env.sh
File metadata and controls
executable file
·45 lines (37 loc) · 1.38 KB
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
#!/bin/bash
# One-click environment setup for C1
set -e
echo "=== Setting up C1 conda environment ==="
# Create or update conda environment
if conda env list | grep -q "^c1 "; then
echo "Conda environment 'c1' already exists. Activating..."
else
echo "Creating new conda environment 'c1' with Python 3.12..."
conda create -n c1 python=3.12 -y
fi
# Activate environment
echo "Activating c1 environment..."
eval "$(conda shell.bash hook)"
conda activate c1
# Install PyTorch with CUDA support
echo "Installing PyTorch with CUDA 12.8..."
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
# Install verl and llamafactory from git
echo "Installing verl and llamafactory from git..."
pip install --no-deps --no-build-isolation \
"verl @ git+https://github.com/volcengine/verl.git@facd9fb50193522f87983b89f886afe8c0810acc" \
"llamafactory @ git+https://github.com/hiyouga/LLaMA-Factory.git@a711bce664faade03b540ad30c41707ba8c928ad"
# Install other dependencies
echo "Installing other dependencies..."
pip install vllm==0.11.0
pip install flash-attn==2.8.1
pip install transformers==4.57.0
pip install "datasets>=2.16.0,<=4.0.0"
pip install python-chess==1.999
echo ""
echo "=== Setup complete! ==="
echo ""
echo "To activate the environment, run:"
echo " conda activate c1"
echo ""
echo "Don't forget to create api_keys.json with your API keys."