Skip to content

Problems with hunggingface_hub #5

Description

@Realitaetsverlust

Hi, I found this repository after searching for non-nvidia tools for 2D-to-3D tools. Thanks for your work, first and foremost. :) However, I am having a fair bit of trouble installing it.

I have set up the entire chain as a docker container as I don't want to pollute my host with countless venv's. For reference, this is what I came up with:

FROM rocm/pytorch:latest

RUN apt-get update && apt-get install -y \
    git \
    python3-pip \
    libgl1 \
    libglx-mesa0 \
    libglib2.0-0 \
    libsparsehash-dev \
    && rm -rf /var/lib/apt/lists/*

RUN git clone https://github.com/CalebisGross/TRELLIS-AMD /app/TRELLIS/AMD

WORKDIR /app/TRELLIS-AMD
RUN chmod +x install_amd.sh
RUN ./install_amd.sh

RUN . .venv/bin/activate # Probably useless?

EXPOSE 7860

ENV ATTN_BACKEND=sdpa XFORMERS_DISABLED=1 SPARSE_BACKEND=torchsparse TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1
CMD [".venv/bin/python", "app.py"]

With this, the image builds fine, but when the container starts, I keep getting that error:

ImportError: cannot import name 'HfFolder' from 'huggingface_hub' (/app/TRELLIS-AMD/.venv/lib/python3.12/site-packages/huggingface_hub/init.py)

I have found a bunch of stuff online regarding that error, including downgrading the library to an older one, but that causes other problems. I tried a downgrade to 0.34.4, 0.26.0 and 1.0.0, but they all won't work and fail with the same error. I even tried upgrading it and using 1.5.0, but that causes the error ImportError: cannot import name 'is_offline_mode' from 'huggingface_hub'.
I was hoping you'd have a few hints for me what could be wrong here. Totally possible I fucked it up somewhere along the line. I'm not very experienced with python and the entire pip ecosystem, let alone having it all work within a docker container.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions