-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·73 lines (64 loc) · 1.9 KB
/
run.sh
File metadata and controls
executable file
·73 lines (64 loc) · 1.9 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
72
73
#!/bin/bash
echo "=================================================="
echo "CS2 Cheat Detection System - Starting Server"
echo "=================================================="
echo
# First check if conda exists in the typical location
if [ -f "$HOME/miniconda3/bin/conda" ]; then
echo "Found conda at $HOME/miniconda3"
export PATH="$HOME/miniconda3/bin:$PATH"
CONDA_BASE="$HOME/miniconda3"
elif [ -f "$HOME/anaconda3/bin/conda" ]; then
echo "Found conda at $HOME/anaconda3"
export PATH="$HOME/anaconda3/bin:$PATH"
CONDA_BASE="$HOME/anaconda3"
elif command -v conda &> /dev/null; then
echo "Conda found in PATH"
CONDA_BASE=$(conda info --base)
else
echo "ERROR: Conda not found"
echo "Please run ./install.sh first to set up the environment"
echo "Press Enter to exit..."
read
exit 1
fi
# Source conda.sh for activation
if [ -f "$CONDA_BASE/etc/profile.d/conda.sh" ]; then
source "$CONDA_BASE/etc/profile.d/conda.sh"
else
echo "ERROR: Could not find conda.sh"
echo "Your conda installation may be incomplete"
echo "Press Enter to exit..."
read
exit 1
fi
# Check if cs2-detect-env exists
if ! conda env list | grep -q "cs2-detect-env"; then
echo "ERROR: cs2-detect-env environment not found"
echo "Please run ./install.sh first to set up the environment"
echo "Press Enter to exit..."
read
exit 1
fi
echo "Activating cs2-detect-env environment..."
# Activate the environment
conda activate cs2-detect-env
if [ $? -ne 0 ]; then
echo "ERROR: Failed to activate conda environment"
echo "Press Enter to exit..."
read
exit 1
fi
echo "Starting the CS2 Cheat Detection web interface..."
echo
echo "Once started, open your browser and go to:"
echo "http://localhost:5000"
echo
echo "Press Ctrl+C to stop the server when done."
echo
# Run the application
python main.py
echo
echo "Server stopped."
echo "Press Enter to exit..."
read