File size: 1,197 Bytes
e2492f0
 
 
 
 
 
 
 
 
 
 
 
 
 
fded136
 
 
e2492f0
 
 
3c6f221
e2492f0
 
3c6f221
 
e2492f0
65045aa
e2492f0
 
 
 
 
 
 
 
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
32
33
34
35
# Use a Python version that matches your (keras2env) as closely as possible
FROM python:3.9-slim 

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
    libgl1-mesa-glx \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Fix permissions for mediapipe model files
RUN chmod -R 755 /usr/local/lib/python3.9/site-packages/mediapipe

# Copy all necessary application files and folders from HFup/ to /app in the container
# These paths are relative to the Dockerfile's location (i.e., inside HFup/)
COPY app.py .
RUN echo "Listing files:" && ls -la # Debug: List files in the build context root
COPY bodybuilding_pose_analyzer bodybuilding_pose_analyzer
COPY external external
# COPY yolov7 yolov7 
# COPY yolov7-w6-pose.pt . 
COPY static static
COPY templates templates

# Ensure the uploads directory within static exists and is writable
RUN mkdir -p static/uploads && chmod -R 777 static/uploads

EXPOSE 7860

# Command to run app with Gunicorn
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "1", "--threads", "2", "--timeout", "300", "app:app"]