Spaces:
Sleeping
Sleeping
dekh le bro
Browse files121234556788910111213141512161718151920# Dockerfile# Use a lightweight official Python image# Dockerfile for the Backend API
# 1. Start with a modern, lightweight Python version.FROM python:3.11-slim
# Set the working directory inside the container# 2. Set the working directory inside the container.WORKDIR /code
# Copy the requirements file and install all dependencies# 3. FIX: Update package lists and install the missing graphics library for OpenCV.RUN apt-get update && apt-get install -y libgl1-mesa-glx
# 4. Copy the requirements file and install Python dependencies.COPY ./requirements.txt /code/requirements.txtRUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy all your application files (backend_app.py, best.pt) into the container# 5. Copy all your application files (backend_app.py, best.pt) into the container.COPY . /code/
# The command that tells the server how to run your FastAPI app# 6. The command that tells the server how to run your FastAPI app.CMD ["uvicorn", "backend_app:app", "--host", "0.0.0.0", "--port", "7860"]Dockerfile+10-6