Goyamproject/React_native_app
1
1# Start with a lightweight Python version2FROM python:3.9-slim3 4# Set the working directory5WORKDIR /code6 7# 1. Install System Dependencies8# FIX: Removed 'libgl1-mesa-glx' (obsolete). Added 'libgl1' and 'libglx-mesa0'.9RUN apt-get update && apt-get install -y \10 libgl1 \11 libglx-mesa0 \12 libglib2.0-0 \13 && rm -rf /var/lib/apt/lists/*14 15# 2. Copy the requirements file16COPY ./requirements.txt /code/requirements.txt17 18# 3. Install Python libraries19RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt20 21# 4. Copy your code and model22COPY . .23 24# 5. Create a folder for uploads just in case25RUN mkdir -p /code/uploads && chmod 777 /code/uploads26 27# 6. Start the server28CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]