raghav commited on
Commit
e64fe6d
·
1 Parent(s): 843d7fe

Switch to Docker SDK for reliable deployment

Browse files
Files changed (2) hide show
  1. Dockerfile +35 -0
  2. Readme.md +2 -3
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dockerfile for Hugging Face Spaces
2
+ FROM python:3.10.13
3
+
4
+ # Set working directory
5
+ WORKDIR /home/user/app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ git-lfs \
11
+ ffmpeg \
12
+ libsm6 \
13
+ libxext6 \
14
+ && rm -rf /var/lib/apt/lists/* \
15
+ && git lfs install
16
+
17
+ # Copy requirements first for better caching
18
+ COPY requirements.txt .
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --no-cache-dir --upgrade pip && \
22
+ pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Copy the application code
25
+ COPY . .
26
+
27
+ # Expose Gradio port
28
+ EXPOSE 7860
29
+
30
+ # Set environment variables for Gradio
31
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
32
+ ENV GRADIO_SERVER_PORT="7860"
33
+
34
+ # Run the application
35
+ CMD ["python", "app.py"]
Readme.md CHANGED
@@ -3,9 +3,8 @@ title: Real vs Fake - AI Image Detector
3
  emoji: 🔍
4
  colorFrom: blue
5
  colorTo: purple
6
- sdk: gradio
7
- sdk_version: 4.0.0
8
- app_file: app.py
9
  pinned: false
10
  license: mit
11
  short_description: AI-powered detector for identifying AI-generated images
 
3
  emoji: 🔍
4
  colorFrom: blue
5
  colorTo: purple
6
+ sdk: docker
7
+ app_port: 7860
 
8
  pinned: false
9
  license: mit
10
  short_description: AI-powered detector for identifying AI-generated images