Sean Carnahan
Track image and asset files with LFS
c636b75
raw
history blame contribute delete
975 Bytes
# 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
# 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 .
COPY bodybuilding_pose_analyzer bodybuilding_pose_analyzer
COPY external external
COPY yolov7 yolov7
COPY yolov7-w6-pose.pt .
COPY static static
# 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"]