Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +42 -36
Dockerfile
CHANGED
|
@@ -1,36 +1,42 @@
|
|
| 1 |
-
# ============================================================
|
| 2 |
-
#
|
| 3 |
-
# ============================================================
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
COPY
|
| 25 |
-
COPY
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
RUN pip install --no-cache-dir
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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"]
|