GYM-AI / Dockerfile
Swapnilbpatil's picture
Update Dockerfile
3b4b250 verified
Raw History Blame Contribute Delete
595 Bytes
FROM python:3.9
RUN useradd -m -u 1000 user
# Install libGL system dependency (fixes libGL.so.1 error)
RUN apt-get update && apt-get install -y libgl1 libglib2.0-0 && rm -rf /var/lib/apt/lists/*
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Force headless OpenCV AFTER ultralytics installs opencv-python
RUN pip install --no-cache-dir --upgrade opencv-python-headless
COPY --chown=user . /app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]