forked from Gleghorn-Lab/Protify
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_protify.sh
More file actions
45 lines (34 loc) · 1.2 KB
/
setup_protify.sh
File metadata and controls
45 lines (34 loc) · 1.2 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
#!/bin/bash
# chmod +x setup_protify.sh
# ./setup_protify.sh
# Set up error handling
set -e # Exit immediately if a command exits with a non-zero status
echo "Setting up Python virtual environment for Protify..."
# Create virtual environment
python3 -m venv ~/protify_venv
# Activate virtual environment
source ~/protify_venv/bin/activate
# Update pip and setuptools
echo "Upgrading pip and setuptools..."
pip install --upgrade pip setuptools
# Install requirements with force reinstall
echo "Installing requirements"
pip install -r requirements.txt
# Install torch and torchvision
echo "Installing torch and torchvision..."
pip install --force-reinstall torch torchvision --index-url https://download.pytorch.org/whl/cu128 -U
# List installed packages for verification
echo -e "\nInstalled packages:"
pip list
# Instructions for future use
echo -e "\n======================="
echo "Setup complete!"
echo "======================="
echo "To activate this environment in the future, run:"
echo " source ~/protify_venv/bin/activate"
echo ""
echo "To deactivate the environment, simply run:"
echo " deactivate"
echo ""
echo "Your virtual environment is located at: ~/protify_venv"
echo "======================="