msumar2011/Parallel_Shoe_Sync
0
1# Use an official Python runtime as a parent image2FROM python:3.11-slim3 4# Set environment variables5ENV PYTHONDONTWRITEBYTECODE=16ENV PYTHONUNBUFFERED=17 8# Set the working directory in the container9WORKDIR /app10 11# Install system dependencies12RUN apt-get update && apt-get install -y \13 build-essential \14 && rm -rf /var/lib/apt/lists/*15 16# Copy the requirements file into the container17COPY requirements.txt .18 19# Install any needed packages specified in requirements.txt20RUN pip install --no-cache-dir -r requirements.txt21 22# Copy the rest of the application code into the container23COPY . .24 25# Create a non-root user and switch to it26RUN useradd -m -u 1000 user27USER user28ENV HOME=/home/user \29 PATH=/home/user/.local/bin:$PATH30 31# Expose the port HF Spaces uses32EXPOSE 786033 34# Run the application using Gunicorn35CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]36 