-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_server_interactive.sh
More file actions
72 lines (58 loc) · 1.72 KB
/
run_server_interactive.sh
File metadata and controls
72 lines (58 loc) · 1.72 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Interactive GPU session script for development
# Usage: bash run_server_interactive.sh
echo "=========================================="
echo "Starting Interactive GPU Session"
echo "African Health Studio Backend"
echo "=========================================="
echo ""
echo "This will request an interactive GPU session with:"
echo " - Account: ufdatastudios"
echo " - Partition: hpg-b200"
echo " - GPUs: 1"
echo " - CPUs: 8"
echo " - Memory: 64GB"
echo " - Time: 4 hours"
echo ""
echo "After the session starts, the server will automatically start."
echo "Press Ctrl+C to stop the server and exit the session."
echo ""
# Start interactive session
srun --account=ufdatastudios \
--partition=hpg-b200 \
--gpus=1 \
--cpus-per-task=8 \
--mem=64GB \
--time=04:00:00 \
--pty bash << 'ENDSSH'
# Inside the interactive session
echo ""
echo "=== GPU STATUS ==="
nvidia-smi
echo ""
echo "=== Setting up environment ==="
# Load CUDA module
module load cuda/12.8.1
# Set CUDA paths
export CUDA_HOME=/apps/compilers/cuda/12.8.1
export PATH=$CUDA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
# Set project root
PROJECT_ROOT="/orange/ufdatastudios/c.okocha/ASRU-Hack"
cd $PROJECT_ROOT
# Set Python path
export PYTHONPATH=$PROJECT_ROOT:$PYTHONPATH
# Add Audio Flamingo path if needed
export PYTHONPATH=$PYTHONPATH:/orange/ufdatastudios/c.okocha/audio-flamingo-audio_flamingo_3
echo "Project root: $PROJECT_ROOT"
echo "Python path: $PYTHONPATH"
echo ""
echo "=== Starting AF3 + MMS-TTS backend server ==="
echo "Server will be available at: http://$(hostname):8000"
echo "Press Ctrl+C to stop"
echo ""
# Start the server
uv run python -m backend.app.server
ENDSSH
echo ""
echo "=== Session ended ==="