noahlee1234 commited on
Commit
16058c2
·
1 Parent(s): a1ed7f3

Log libvtk missing shared object error for next session

Browse files
Files changed (1) hide show
  1. docs/hf-space-libvtk-error.md +24 -0
docs/hf-space-libvtk-error.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OpenCascade (OCP) Missing Shared Library Error
2
+
3
+ **Issue:**
4
+ The HF Space Docker container builds correctly and the Gradio app runs, but the actual geometry generation subprocess fails with:
5
+ `ImportError: libvtkWrappingPythonCore3.10-9.3.so: cannot open shared object file: No such file or directory`
6
+
7
+ **Root Cause:**
8
+ `cadquery-ocp` (OpenCascade) from conda-forge has implicit C++ dependencies that aren't being satisfied by the base `continuumio/miniconda3:latest` (Debian-based) Docker image. Specifically, `libvtk` (Visualization Toolkit) components are missing at runtime.
9
+
10
+ **Why this happened:**
11
+ When installing `ocp` via `conda install -c conda-forge ocp`, Conda usually resolves and installs all required C++ shared libraries (like vtk, xorg, qt, etc). However, sometimes `conda-forge` packages assume the host system has certain graphical/X11 or VTK libraries pre-installed, or the conda environment path isn't exposing the `libvtk` binaries correctly to the subprocess `LD_LIBRARY_PATH`.
12
+
13
+ **Next Steps to Fix (Next Session):**
14
+ 1. We need to identify exactly which system package provides `libvtkWrappingPythonCore3.10-9.3.so`. It might require installing VTK via conda explicitly (`conda install -c conda-forge vtk`), or installing it via `apt-get` in the Dockerfile.
15
+ 2. Alternatively, using a different base image like `condaforge/miniforge3` instead of `continuumio/miniconda3` often resolves these hidden `conda-forge` shared library linking issues.
16
+ 3. Once the VTK library issue is patched in the Dockerfile, the CAD engine will successfully render.
17
+
18
+ **Current Status:**
19
+ - UI: Working
20
+ - Docker Build: Passing
21
+ - Fallback Prompt Routing: Working
22
+ - CAD Execution: Failing on `libvtk` import
23
+
24
+ (Logged at 2026-04-10 22:25 PDT)