-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_and_run.sh
More file actions
executable file
Β·46 lines (40 loc) Β· 1.27 KB
/
build_and_run.sh
File metadata and controls
executable file
Β·46 lines (40 loc) Β· 1.27 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
#!/bin/bash
# Build and Run Script for Unified Deepfake Detection & Face Verification API
echo "π¨ Building Docker image..."
docker build -t deepfake-detector:latest .
if [ $? -eq 0 ]; then
echo "β
Build successful!"
echo ""
echo "π Starting container..."
# Stop and remove existing container if running
docker stop deepfake-detector 2>/dev/null
docker rm deepfake-detector 2>/dev/null
# Run the container
docker run -d \
--name deepfake-detector \
--gpus all \
-p 8080:8080 \
-v $(pwd)/model:/app/model \
-e DEEPFAKE_THRESHOLD=0.5 \
-e VERIFICATION_THRESHOLD=0.6 \
-e FRAME_INTERVAL=5 \
-e MAX_FACES=30 \
-e ENABLE_LIVENESS=false \
-e ENABLE_DEEPFAKE_CHECK=true \
-e ENABLE_GRADCAM=false \
deepfake-detector:latest
echo "β
Container started!"
echo ""
echo "π Checking logs..."
sleep 3
docker logs deepfake-detector
echo ""
echo "π API is available at: http://localhost:8080"
echo "π API Documentation: http://localhost:8080/docs"
echo ""
echo "To view logs: docker logs -f deepfake-detector"
echo "To stop: docker stop deepfake-detector"
else
echo "β Build failed!"
exit 1
fi