Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create linux_install.sh #567

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

SleepTheGod
Copy link

Step-by-Step Guide
Install system dependencies: This includes software properties like git, pip, and other Python development tools.
Set up a virtual environment: This helps to manage Python dependencies separately from the system libraries.
Install PyTorch: Depending on your system's GPU capabilities, you might install the CPU or GPU version.
Install Hugging Face Transformers and Bark: These are Python libraries, so they can be installed directly via pip.
Bash Script
Here’s a script you can save as setup_server.sh. This script:

Updates the system
Installs Python and pip
Sets up a virtual environment
Installs PyTorch (CPU version, as GPU setup can vary widely based on the specific hardware and might require additional drivers and configurations)
Installs the necessary Python libraries

Instructions to Use the Script
Copy the script: Save the above script on your Debian 12 server in a file called setup_server.sh.
Make it executable: Run chmod +x setup_server.sh to make the script executable.
Run the script: Execute the script with sudo ./setup_server.sh. Ensure you run it as sudo because the script needs root permissions for certain operations.
Additional Considerations
GPU Support: If you need GPU support for PyTorch, you'll need to replace the PyTorch installation command with one that suits your specific NVIDIA GPU, which typically involves installing CUDA and cuDNN beforehand. You can find appropriate installation commands on the PyTorch official site.
Custom Configurations: If Bark or Transformers require specific configurations post-installation, you should extend this script to include those configurations.
Error Handling: Adding error checks after critical steps in the script could prevent cascading failures and help in debugging.
This script should get you started with a basic setup. Modify it according to your specific server specs or additional requirements.

@SleepTheGod
Copy link
Author

SleepTheGod commented May 14, 2024

Uploading sunosetuppoc.png…

@SleepTheGod
Copy link
Author

`#!/bin/bash

Ensure the script is run as root

if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi

Update and install essential packages

apt-get update && apt-get upgrade -y
apt-get install -y python3-pip python3-venv git

Create a directory for your setup

mkdir -p /opt/my_project
cd /opt/my_project

Set up Python virtual environment

python3 -m venv venv
source venv/bin/activate

Install PyTorch (CPU version)

pip install torch torchvision torchaudio

Clone the transformers and Bark repository and install them

git clone https://github.com/huggingface/transformers.git
cd transformers
pip install .
cd ..

git clone https://github.com/suno-ai/bark.git
cd bark
pip install .

echo "Setup complete. All packages are installed."
`

Copy link
Author

@SleepTheGod SleepTheGod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant