DegenGamer1702 commited on
Commit
1ffe0eb
·
verified ·
1 Parent(s): fd31d3e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -36
Dockerfile CHANGED
@@ -1,36 +1,42 @@
1
- # ============================================================
2
- # GPU-ENABLED SELF-CONTAINED IMAGE FOR DEEPFAKE VIDEO DETECTOR
3
- # ============================================================
4
- FROM pytorch/pytorch:2.2.2-cuda12.1-cudnn8-runtime
5
-
6
- ENV DEBIAN_FRONTEND=noninteractive \
7
- PYTHONDONTWRITEBYTECODE=1 \
8
- PYTHONUNBUFFERED=1
9
-
10
- # Force reinstall Gradio 4.44.1 every time (avoids cache)
11
- ARG GRADIO_FORCE_REINSTALL=1
12
- RUN pip install --no-cache-dir --upgrade gradio==4.44.1
13
-
14
-
15
- # System deps for OpenCV + dlib
16
- RUN apt-get update && apt-get install -y --no-install-recommends \
17
- build-essential cmake \
18
- libgl1 libglib2.0-0 libsm6 libxext6 libxrender1 \
19
- && rm -rf /var/lib/apt/lists/*
20
-
21
- WORKDIR /app
22
-
23
- # Copy app + requirements
24
- COPY requirements.txt /app/requirements.txt
25
- COPY app.py /app/app.py
26
-
27
- # ✅ Copy your model + landmark file directly into the image
28
- COPY models /app/models
29
- COPY shape_predictor_68_face_landmarks.dat /app/
30
-
31
- # Install TensorFlow (GPU-capable) + requirements
32
- RUN pip install --no-cache-dir tensorflow==2.18.0
33
- RUN pip install --no-cache-dir -r requirements.txt
34
-
35
- EXPOSE 7860
36
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
1
+ # ============================================================
2
+ # Deepfake Video Detector - Hugging Face GPU Dockerfile
3
+ # ============================================================
4
+ # Use Hugging Face's official GPU image (includes CUDA + PyTorch)
5
+ FROM ghcr.io/huggingface/transformers-pytorch-gpu:latest
6
+
7
+ # Disable prompts and enable noninteractive mode
8
+ ENV DEBIAN_FRONTEND=noninteractive \
9
+ PYTHONDONTWRITEBYTECODE=1 \
10
+ PYTHONUNBUFFERED=1
11
+
12
+ # Install system dependencies
13
+ RUN apt-get update && apt-get install -y --no-install-recommends \
14
+ build-essential cmake \
15
+ libgl1 libglib2.0-0 libsm6 libxext6 libxrender1 \
16
+ && rm -rf /var/lib/apt/lists/*
17
+
18
+ WORKDIR /app
19
+
20
+ # ------------------------------------------------------------
21
+ # Copy project files into the image
22
+ # ------------------------------------------------------------
23
+ COPY requirements.txt /app/requirements.txt
24
+ COPY app.py /app/app.py
25
+ COPY models /app/models
26
+ COPY shape_predictor_68_face_landmarks.dat /app/
27
+
28
+ # ------------------------------------------------------------
29
+ # Install dependencies
30
+ # ------------------------------------------------------------
31
+ RUN pip install --no-cache-dir tensorflow==2.18.0
32
+ RUN pip install --no-cache-dir -r requirements.txt
33
+
34
+ # Force-remove old Gradio and install the latest stable version
35
+ RUN pip uninstall -y gradio gradio_client || true
36
+ RUN pip install --no-cache-dir --upgrade gradio==4.44.1 gradio_client==0.16.0
37
+
38
+ # ------------------------------------------------------------
39
+ # Expose app port and launch
40
+ # ------------------------------------------------------------
41
+ EXPOSE 7860
42
+ CMD ["python", "app.py"]