-
Notifications
You must be signed in to change notification settings - Fork 0
/
ubuntu_setup.sh
executable file
·43 lines (31 loc) · 1.06 KB
/
ubuntu_setup.sh
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
#!/bin/bash
# git clone https://github.com/TencentARC/PhotoMaker.git
# pip install git+https://github.com/TencentARC/PhotoMaker.git
# "To make this script executable, run: chmod +x ubuntu_setup.sh"
# "To execute the script, run: ./ubuntu_setup.sh"
# Setting it so it exits on failure.
set -e
# Update package list and install pip and venv
echo "Updating package list..."
sudo apt update
echo "Installing pip..."
sudo apt install -y python3-pip
echo "Installing Python venv..."
sudo apt install -y python3-venv
# Create virtual environment
echo "Creating virtual environment..."
python3 -m venv env
# Activate virtual environment
echo "Activating virtual environment..."
source env/bin/activate
# Install requirements
echo "Installing requirements from requirements.txt..."
pip install -r requirements.txt
# Configure git
echo "Configuring git..."
read -p "Enter your git username: " username
read -p "Enter your git email: " email
git config --global user.name "$username"
git config --global user.email "$email"
echo "Setup complete."
# To run flask run --host=0.0.0.0