File size: 881 Bytes
03e9c25
a32a113
 
 
 
 
4bd3538
 
 
 
 
 
 
03e9c25
a32a113
4bd3538
03e9c25
a32a113
4bd3538
03e9c25
 
4bd3538
a32a113
 
4bd3538
a32a113
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
# 1. Base Image
FROM python:3.11-slim

# 2. Set the working directory
WORKDIR /app

# 3. Install PyTorch (CPU version) FIRST from its custom index
RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu

# 4. Install API dependencies SECOND from the normal Python index
RUN pip install --no-cache-dir fastapi uvicorn transformers pillow pydantic requests

# 5. Pre-download the NEW SigLIP deepfake model
RUN python -c "from transformers import pipeline; pipeline('image-classification', model='prithivMLmods/deepfake-detector-model-v1')"

# 6. Copy your app.py specifically into the current WORKDIR (/app)
COPY app.py /app/app.py

# 7. Set environment variable to make sure Python finds the /app folder
ENV PYTHONPATH=/app

# 8. Expose port
EXPOSE 7860

# 9. Start the node
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]