File size: 878 Bytes
65c9437
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
# 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"]