CouchPotato101/Prostate_Cancer_Detection_Backend
0
1# Use official Python 3.9 image2FROM python:3.93 4# Install system dependencies needed for headless OpenCV5RUN apt-get update && apt-get install -y \6 libglib2.0-0 \7 && rm -rf /var/lib/apt/lists/*8 9# Create a non-root user10RUN useradd -m -u 1000 user11USER user12ENV PATH="/home/user/.local/bin:$PATH"13 14# Set working directory15WORKDIR /app16 17# Copy requirements first for caching18COPY --chown=user ./requirements.txt ./requirements.txt19 20# Install Python dependencies21RUN pip install --no-cache-dir --upgrade -r requirements.txt22 23# Copy the rest of the app24COPY --chown=user . /app25 26# Expose port (optional, but good practice)27EXPOSE 786028 29# Command to run the FastAPI app30CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]31 