im facing issue while using this model to create docker for it the things are actualy giving error

#6
by Sidharthpj - opened

the error im getting while running the docker file i created , Successfully installed nvdiffrast-0.3.1.torch
unique3d | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
unique3d | Successfully installed nvdiffrast-0.3.1.torch
unique3d | WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
unique3d | /usr/local/lib/python3.8/dist-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: Transformer2DModelOutput is deprecated and will be removed in version 1.0.0. Importing Transformer2DModelOutput from diffusers.models.transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.modeling_outputs import Transformer2DModelOutput, instead.
unique3d | deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)
unique3d | [2024-06-17 07:09:05 +0000] [34] [ERROR] Exception in worker process
unique3d | Traceback (most recent call last):
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
unique3d | worker.init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/uvicorn/workers.py", line 75, in init_process
unique3d | super().init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 134, in init_process
unique3d | self.load_wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
unique3d | self.wsgi = self.app.wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/base.py", line 67, in wsgi
unique3d | self.callable = self.load()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
unique3d | return self.load_wsgiapp()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
unique3d | return util.import_app(self.app_uri)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 371, in import_app
unique3d | mod = importlib.import_module(module)
unique3d | File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
unique3d | return _bootstrap._gcd_import(name[level:], package, level)
unique3d | File "", line 1014, in _gcd_import
unique3d | File "", line 991, in _find_and_load
unique3d | File "", line 975, in _find_and_load_unlocked
unique3d | File "", line 671, in _load_unlocked
unique3d | File "", line 843, in exec_module
unique3d | File "", line 219, in _call_with_frames_removed
unique3d | File "/usr/src/app/app.py", line 25, in
unique3d | from gradio_app.gradio_3dgen import create_ui as create_3d_ui
unique3d | File "/usr/src/app/gradio_app/gradio_3dgen.py", line 7, in
unique3d | from gradio_app.custom_models.mvimg_prediction import run_mvprediction
unique3d | File "/usr/src/app/gradio_app/custom_models/mvimg_prediction.py", line 10, in
unique3d | from scripts.utils import session, simple_preprocess
unique3d | File "/usr/src/app/scripts/utils.py", line 7, in
unique3d | from pytorch3d.renderer import TexturesVertex
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/init.py", line 3, in
unique3d | from .blending import (
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/blending.py", line 9, in
unique3d | from pytorch3d import _C
unique3d | ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory
unique3d | /usr/local/lib/python3.8/dist-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: Transformer2DModelOutput is deprecated and will be removed in version 1.0.0. Importing Transformer2DModelOutput from diffusers.models.transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.modeling_outputs import Transformer2DModelOutput, instead.
unique3d | deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)
unique3d | [2024-06-17 07:09:05 +0000] [28] [ERROR] Exception in worker process
unique3d | Traceback (most recent call last):
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
unique3d | worker.init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/uvicorn/workers.py", line 75, in init_process
unique3d | super().init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 134, in init_process
unique3d | self.load_wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
unique3d | self.wsgi = self.app.wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/base.py", line 67, in wsgi
unique3d | self.callable = self.load()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
unique3d | return self.load_wsgiapp()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
unique3d | return util.import_app(self.app_uri)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 371, in import_app
unique3d | mod = importlib.import_module(module)
unique3d | File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
unique3d | return _bootstrap._gcd_import(name[level:], package, level)
unique3d | File "", line 1014, in _gcd_import
unique3d | File "", line 991, in _find_and_load
unique3d | File "", line 975, in _find_and_load_unlocked
unique3d | File "", line 671, in _load_unlocked
unique3d | File "", line 843, in exec_module
unique3d | File "", line 219, in _call_with_frames_removed
unique3d | File "/usr/src/app/app.py", line 25, in
unique3d | from gradio_app.gradio_3dgen import create_ui as create_3d_ui
unique3d | File "/usr/src/app/gradio_app/gradio_3dgen.py", line 7, in
unique3d | from gradio_app.custom_models.mvimg_prediction import run_mvprediction
unique3d | File "/usr/src/app/gradio_app/custom_models/mvimg_prediction.py", line 10, in
unique3d | from scripts.utils import session, simple_preprocess
unique3d | File "/usr/src/app/scripts/utils.py", line 7, in
unique3d | from pytorch3d.renderer import TexturesVertex
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/init.py", line 3, in
unique3d | from .blending import (
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/blending.py", line 9, in
unique3d | from pytorch3d import _C
unique3d | ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory
unique3d | /usr/local/lib/python3.8/dist-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: Transformer2DModelOutput is deprecated and will be removed in version 1.0.0. Importing Transformer2DModelOutput from diffusers.models.transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.modeling_outputs import Transformer2DModelOutput, instead.
unique3d | deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)
unique3d | [2024-06-17 07:09:05 +0000] [29] [ERROR] Exception in worker process
unique3d | Traceback (most recent call last):
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
unique3d | worker.init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/uvicorn/workers.py", line 75, in init_process
unique3d | super().init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 134, in init_process
unique3d | self.load_wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
unique3d | self.wsgi = self.app.wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/base.py", line 67, in wsgi
unique3d | self.callable = self.load()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
unique3d | return self.load_wsgiapp()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
unique3d | return util.import_app(self.app_uri)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 371, in import_app
unique3d | mod = importlib.import_module(module)
unique3d | File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
unique3d | return _bootstrap._gcd_import(name[level:], package, level)
unique3d | File "", line 1014, in _gcd_import
unique3d | File "", line 991, in _find_and_load
unique3d | File "", line 975, in _find_and_load_unlocked
unique3d | File "", line 671, in _load_unlocked
unique3d | File "", line 843, in exec_module
unique3d | File "", line 219, in _call_with_frames_removed
unique3d | File "/usr/src/app/app.py", line 25, in
unique3d | from gradio_app.gradio_3dgen import create_ui as create_3d_ui
unique3d | File "/usr/src/app/gradio_app/gradio_3dgen.py", line 7, in
unique3d | from gradio_app.custom_models.mvimg_prediction import run_mvprediction
unique3d | File "/usr/src/app/gradio_app/custom_models/mvimg_prediction.py", line 10, in
unique3d | from scripts.utils import session, simple_preprocess
unique3d | File "/usr/src/app/scripts/utils.py", line 7, in
unique3d | from pytorch3d.renderer import TexturesVertex
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/init.py", line 3, in
unique3d | from .blending import (
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/blending.py", line 9, in
unique3d | from pytorch3d import _C
unique3d | ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory
unique3d | /usr/local/lib/python3.8/dist-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: Transformer2DModelOutput is deprecated and will be removed in version 1.0.0. Importing Transformer2DModelOutput from diffusers.models.transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.modeling_outputs import Transformer2DModelOutput, instead.
unique3d | deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)
unique3d | [2024-06-17 07:09:05 +0000] [32] [ERROR] Exception in worker process
unique3d | Traceback (most recent call last):
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 609, in spawn_worker
unique3d | worker.init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/uvicorn/workers.py", line 75, in init_process
unique3d | super().init_process()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 134, in init_process
unique3d | self.load_wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/workers/base.py", line 146, in load_wsgi
unique3d | self.wsgi = self.app.wsgi()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/base.py", line 67, in wsgi
unique3d | self.callable = self.load()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 58, in load
unique3d | return self.load_wsgiapp()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 48, in load_wsgiapp
unique3d | return util.import_app(self.app_uri)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/util.py", line 371, in import_app
unique3d | mod = importlib.import_module(module)
unique3d | File "/usr/lib/python3.8/importlib/init.py", line 127, in import_module
unique3d | return _bootstrap._gcd_import(name[level:], package, level)
unique3d | File "", line 1014, in _gcd_import
unique3d | File "", line 991, in _find_and_load
unique3d | File "", line 975, in _find_and_load_unlocked
unique3d | File "", line 671, in _load_unlocked
unique3d | File "", line 843, in exec_module
unique3d | File "", line 219, in _call_with_frames_removed
unique3d | File "/usr/src/app/app.py", line 25, in
unique3d | from gradio_app.gradio_3dgen import create_ui as create_3d_ui
unique3d | File "/usr/src/app/gradio_app/gradio_3dgen.py", line 7, in
unique3d | from gradio_app.custom_models.mvimg_prediction import run_mvprediction
unique3d | File "/usr/src/app/gradio_app/custom_models/mvimg_prediction.py", line 10, in
unique3d | from scripts.utils import session, simple_preprocess
unique3d | File "/usr/src/app/scripts/utils.py", line 7, in
unique3d | from pytorch3d.renderer import TexturesVertex
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/init.py", line 3, in
unique3d | from .blending import (
unique3d | File "/usr/local/lib/python3.8/dist-packages/pytorch3d/renderer/blending.py", line 9, in
unique3d | from pytorch3d import _C
unique3d | ImportError: libcudart.so.10.1: cannot open shared object file: No such file or directory
unique3d | [2024-06-17 07:09:05 +0000] [34] [INFO] Worker exiting (pid: 34)
unique3d | [2024-06-17 07:09:05 +0000] [28] [INFO] Worker exiting (pid: 28)
unique3d | [2024-06-17 07:09:05 +0000] [29] [INFO] Worker exiting (pid: 29)
unique3d | [2024-06-17 07:09:05 +0000] [32] [INFO] Worker exiting (pid: 32)
unique3d | [2024-06-17 07:09:06 +0000] [1] [ERROR] Worker (pid:34) exited with code 3
unique3d | [2024-06-17 07:09:06 +0000] [1] [ERROR] Worker (pid:29) exited with code 3
unique3d | Traceback (most recent call last):
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 209, in run
unique3d | self.sleep()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 360, in sleep
unique3d | ready = select.select([self.PIPE[0]], [], [], 1.0)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 242, in handle_chld
unique3d | self.reap_workers()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 516, in reap_workers
unique3d | wpid, status = os.waitpid(-1, os.WNOHANG)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 242, in handle_chld
unique3d | self.reap_workers()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 530, in reap_workers
unique3d | raise HaltServer(reason, self.WORKER_BOOT_ERROR)
unique3d | gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
unique3d |
unique3d | During handling of the above exception, another exception occurred:
unique3d |
unique3d | Traceback (most recent call last):
unique3d | File "/usr/local/bin/gunicorn", line 8, in
unique3d | sys.exit(run())
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/wsgiapp.py", line 67, in run
unique3d | WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]", prog=prog).run()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/base.py", line 236, in run
unique3d | super().run()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/app/base.py", line 72, in run
unique3d | Arbiter(self).run()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 229, in run
unique3d | self.halt(reason=inst.reason, exit_status=inst.exit_status)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 342, in halt
unique3d | self.stop()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 396, in stop
unique3d | time.sleep(0.1)
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 242, in handle_chld
unique3d | self.reap_workers()
unique3d | File "/usr/local/lib/python3.8/dist-packages/gunicorn/arbiter.py", line 530, in reap_workers
unique3d | raise HaltServer(reason, self.WORKER_BOOT_ERROR)
unique3d | gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
the docker file i created i tryed to run requirement file its giving error and the thing im using it in windows , dockerfile is :
FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04

Set the working directory in the container

WORKDIR /usr/src/app

Set non-interactive frontend for apt to avoid interactive prompts

ENV DEBIAN_FRONTEND=noninteractive

Install system dependencies

RUN apt-get update -y && apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa -y

Install Python 3.8 and other dependencies

RUN apt-get update -y && apt-get install -y
python3.8
python3.8-dev
python3-pip
python3-pyaudio
python3.8-distutils
gnupg2
curl
ffmpeg
portaudio19-dev
libopenblas-dev
ninja-build
build-essential
pkg-config
wget
gcc
git
&& apt-get clean && rm -rf /var/lib/apt/lists/*

Install python3-venv and python3-setuptools to ensure all necessary Python packaging tools are available

RUN apt-get update -y && apt-get install -y python3-venv python3-setuptools

Create symbolic links from python3.8 to python and python3

RUN ln -sf /usr/bin/python3.8 /usr/bin/python

RUN ln -sf /usr/bin/python3.8 /usr/bin/python3

RUN ln -s /usr/bin/python3.8 /usr/bin/python

Copy the current directory contents into the container at /usr/src/app

RUN python -m pip install pytorch3d

# Clone pytorch3d repository

RUN git clone https://github.com/facebookresearch/pytorch3d.git /tmp/pytorch3d

# Checkout the stable branch

RUN cd /tmp/pytorch3d && git checkout stable

Install torch and related packages from the correct URL

#RUN python -m pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118
RUN python -m pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu121

Install torch-scatter from source

RUN pip3 install git+https://github.com/rusty1s/pytorch_scatter.git
COPY . .

Install other dependencies

#RUN python3.8 -m pip install --trusted-host pypi.org --no-cache-dir -r requirements.txt
#RUN pip install -r requirements.txt

Install additional required packages

RUN python -m pip install fire gradio spaces rembg accelerate datasets diffusers>=0.26.3 jaxtyping numba numpy omegaconf>=2.3.0 opencv_python opencv_python_headless peft Pillow pygltflib pymeshlab>=2023.12 tqdm transformers trimesh typeguard wandb xformers ninja

Install gunicorn, uvicorn, fastapi, and python-multipart

RUN python3.8 -m pip install gunicorn uvicorn fastapi python-multipart

Make port 30514 available to the world outside this container

EXPOSE 30514

Command to run the application

CMD ["gunicorn", "-w", "4", "-k", "uvicorn.workers.UvicornWorker", "-b", "0.0.0.0:30514", "--timeout", "3000", "app:app"]

Owner

Sign up or log in to comment