InstantMesh icon indicating copy to clipboard operation
InstantMesh copied to clipboard

Running a docker container (built from provided Dockerfile) fails

Open Darth-Carrotpie opened this issue 1 year ago • 1 comments

Error message provided:

$ winpty docker run -it -p 43839:43839 --platform=linux/amd64 --gpus all -v $MODEL_DIR:/workspace/instantmesh/models instantmesh

==========
== CUDA ==
==========

CUDA Version 12.4.1

Container image Copyright (c) 2016-2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.

This container image and its contents are governed by the NVIDIA Deep Learning Container License.
By pulling and using the container, you accept the terms and conditions of this license:
https://developer.nvidia.com/ngc/nvidia-deep-learning-container-license

A copy of this license is made available in this container at /NGC-DL-CONTAINER-LICENSE for your convenience.

Traceback (most recent call last):
  File "/workspace/instantmesh/app.py", line 5, in <module>
    import rembg
  File "/workspace/miniconda3/envs/instantmesh/lib/python3.10/site-packages/rembg/__init__.py", line 5, in <module>
    from .bg import remove
  File "/workspace/miniconda3/envs/instantmesh/lib/python3.10/site-packages/rembg/bg.py", line 6, in <module>
    import onnxruntime as ort
ModuleNotFoundError: No module named 'onnxruntime'

Darth-Carrotpie avatar Nov 23 '24 19:11 Darth-Carrotpie

The following fixes worked for me in the end.

In the Docker file, at the end of Run pip install X lines, add: RUN pip install onnxruntime

Then in requirements:

-accelerate
+accelerate==0.31.0

Darth-Carrotpie avatar Nov 23 '24 19:11 Darth-Carrotpie