File size: 1,069 Bytes
7bdf2e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash

# Update package lists
apt-get update && apt-get upgrade -y

# Install Python and pip
apt-get install -y python3 python3-pip python3-venv

# Create a virtual environment
python3 -m venv venv
source venv/bin/activate

# Upgrade pip and setuptools
pip install --upgrade pip setuptools wheel

# Install GPU-related dependencies (optional, commented out by default)
# Uncomment if you're using a GPU-enabled space
# pip install nvidia-cuda-nvrtc-cu11 nvidia-cuda-runtime-cu11 nvidia-cuda-cupti-cu11

# Install core Python libraries
pip install pandas==2.2.1 \
            numpy==1.26.3

# Install Machine Learning and Deep Learning libraries
pip install torch==2.2.1 \
            transformers==4.38.1 \
            datasets==2.17.1 \
            accelerate==0.26.1

# Install Web Framework
pip install streamlit==1.31.1

# Install additional dependencies
pip install protobuf==4.25.3 \
            typing-extensions==4.10.0

# Optional: Verify installations
pip list

echo "Setup complete! Virtual environment is activated and all dependencies are installed."