DeepfakeDeployment / Dockerfile
tayyabimam's picture
Update Dockerfile
07ce85c verified
raw
history blame
906 Bytes
FROM pytorch/pytorch:1.13.1-cuda11.6-cudnn8-runtime
WORKDIR /app
# Add system-level dependencies for dlib and OpenCV
RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
build-essential \
libgl1 \
libboost-all-dev \
python3-dev \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Create app directories
RUN mkdir -p uploaded_images static models uploaded_videos
# Install numpy first to avoid cv2/numpy conflict
RUN pip install --no-cache-dir "numpy<1.25"
# Install Python dependencies
RUN pip install --no-cache-dir \
opencv-python-headless==4.7.0.72 \
fastapi==0.95.0 \
uvicorn==0.21.1 \
python-multipart==0.0.6 \
matplotlib==3.7.1 \
huggingface_hub==0.14.1 \
face_recognition==1.3.0 \
torchvision==0.14.1 \
Pillow==9.4.0
COPY app.py .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]