Yoga_App / Dockerfile
NeuSpaarX's picture
Upload 5 files (#1)
123d35e verified
Raw
History Blame Contribute Delete
752 Bytes
# Use Python 3.11 slim image as base
FROM python:3.11-slim
# Set working directory
WORKDIR /code
# Install system dependencies
RUN apt-get update && apt-get install -y \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set MPLCONFIGDIR to a writable directory
ENV MPLCONFIGDIR=/tmp/.config/matplotlib
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code
COPY app.py .
COPY MediaPipe_Model.pkl .
COPY pose_links.txt .
# Expose the port the app runs on
EXPOSE 7860
# Command to run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers"]