Skip to content

fix: docker crash on startup caused by missing OpenCV system libs#185

Open
devanmolx wants to merge 1 commit intofireform-core:mainfrom
devanmolx:fix/docker-libgl-dependency
Open

fix: docker crash on startup caused by missing OpenCV system libs#185
devanmolx wants to merge 1 commit intofireform-core:mainfrom
devanmolx:fix/docker-libgl-dependency

Conversation

@devanmolx
Copy link

Fixes #184

Problem

python:3.11-slim doesn't include libGL which cv2 requires, causing an
immediate crash on startup:

ImportError: libGL.so.1: cannot open shared object file: No such file or directory

Changes

Added to Dockerfile apt-get install:

  • libgl1 — provides libGL.so.1 required by cv2
  • libglib2.0-0 — glib dependencies also needed by cv2

How to verify

  1. docker compose build --no-cache
  2. docker compose up -d
  3. docker exec -it fireform-app bash
  4. python src/main.py — should run past the import stage

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • Self-reviewed my changes
  • No new warnings introduced
  • Tested locally and verified fix works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker build fails with libGL.so.1 not found error

1 participant