Spaces:
Sleeping
Sleeping
ftshijt
commited on
Commit
·
0223e0e
1
Parent(s):
c1ed71e
update build process
Browse files- .profile +0 -6
- build.sh → postBuild +4 -21
.profile
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
# This file is executed during setup phase of the Hugging Face Space
|
| 3 |
-
|
| 4 |
-
# Execute build.sh to install VERSA and its dependencies
|
| 5 |
-
chmod +x build.sh
|
| 6 |
-
./build.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
build.sh → postBuild
RENAMED
|
@@ -1,16 +1,9 @@
|
|
| 1 |
#!/bin/bash
|
| 2 |
-
#
|
| 3 |
|
| 4 |
set -e # Exit immediately if a command fails
|
| 5 |
|
| 6 |
-
echo "Starting VERSA installation for Hugging Face Space
|
| 7 |
-
|
| 8 |
-
# Install system dependencies (already handled by packages.txt, but double-check)
|
| 9 |
-
echo "Checking system dependencies..."
|
| 10 |
-
if ! command -v git &> /dev/null || ! command -v ffmpeg &> /dev/null; then
|
| 11 |
-
echo "Some system dependencies are missing. Please check packages.txt includes: git build-essential libsndfile1 ffmpeg"
|
| 12 |
-
exit 1
|
| 13 |
-
fi
|
| 14 |
|
| 15 |
# Set up directory structure
|
| 16 |
echo "Setting up directory structure..."
|
|
@@ -31,7 +24,7 @@ if [ -d "${VERSA_ROOT}" ]; then
|
|
| 31 |
cd ..
|
| 32 |
else
|
| 33 |
echo "Cloning fresh VERSA repository..."
|
| 34 |
-
git clone https://github.com/
|
| 35 |
fi
|
| 36 |
|
| 37 |
# Install VERSA
|
|
@@ -39,20 +32,10 @@ echo "Installing VERSA and dependencies..."
|
|
| 39 |
cd "${VERSA_ROOT}"
|
| 40 |
pip install -e .
|
| 41 |
|
| 42 |
-
# Install basic metric dependencies
|
| 43 |
-
echo "Installing basic metric dependencies..."
|
| 44 |
-
# You can add specific metric installers here if needed
|
| 45 |
-
# For example:
|
| 46 |
-
# cd tools/nisqa
|
| 47 |
-
# bash install.sh
|
| 48 |
-
# cd ../..
|
| 49 |
-
|
| 50 |
-
echo "VERSA installation completed successfully!"
|
| 51 |
-
|
| 52 |
# Create a file to indicate successful installation
|
| 53 |
touch "${VERSA_ROOT}/.installation_complete"
|
| 54 |
|
| 55 |
# Return to the original directory
|
| 56 |
cd ..
|
| 57 |
|
| 58 |
-
echo "
|
|
|
|
| 1 |
#!/bin/bash
|
| 2 |
+
# This script will run after the environment has been built but before the Space is started
|
| 3 |
|
| 4 |
set -e # Exit immediately if a command fails
|
| 5 |
|
| 6 |
+
echo "Starting VERSA installation for Hugging Face Space..."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Set up directory structure
|
| 9 |
echo "Setting up directory structure..."
|
|
|
|
| 24 |
cd ..
|
| 25 |
else
|
| 26 |
echo "Cloning fresh VERSA repository..."
|
| 27 |
+
git clone https://github.com/shinjiwlab/versa.git "${VERSA_ROOT}"
|
| 28 |
fi
|
| 29 |
|
| 30 |
# Install VERSA
|
|
|
|
| 32 |
cd "${VERSA_ROOT}"
|
| 33 |
pip install -e .
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Create a file to indicate successful installation
|
| 36 |
touch "${VERSA_ROOT}/.installation_complete"
|
| 37 |
|
| 38 |
# Return to the original directory
|
| 39 |
cd ..
|
| 40 |
|
| 41 |
+
echo "VERSA installation completed successfully!"
|