# Start with an official PyTorch Docker image with CUDA support for GPU acceleration FROM pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime # Install essential packages RUN apt-get update && apt-get install -y \ git \ wget \ && rm -rf /var/lib/apt/lists/* # Install Hugging Face Transformers, TorchScript, and additional dependencies RUN pip install torch torchvision transformers requests # Clone Meta Sapiens Pose model and MotionBERT model from Hugging Face RUN mkdir /models WORKDIR /models # Meta Sapiens Pose Model RUN git clone https://huggingface.co/facebook/sapiens-pose-1b-torchscript /models/sapiens_pose # MotionBERT Model RUN git clone https://huggingface.co/walterzhu/MotionBERT /models/motionbert # Copy the inference script COPY app.py /app/app.py # Expose port for Flask app EXPOSE 7860 # Run the inference script CMD ["python", "/app/app.py"]