-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name 'TypeIs' #719
Comments
Same issue on Windows 10 |
I have the same error with profile
|
Here's my investigation of the issue:
|
Can you share your revised Dockerfile? Or where you are putting |
I inserted it in this line of the Dockerfile and it is working in my environment. Inserted are the following RUN --mount=type=cache,target=/root/.cache/pip \
pip uninstall -y typing_extensions && \
pip install typing_extensions==4.11.0 |
The suggestion by @yasu-nxt worked for me.
|
This worked for me too. Using Ubuntu. |
this works for me too. |
Works for me too! Ubuntu 22.04 |
Confirmed fixed in debian 12.1 |
Confirmed fixed in ubuntu 22.04 |
Confirmed fixed in Windows Docker Desktop 4.31.1 (WSL2) |
i fixed this by adding # Add this line to update typing_extensions
RUN pip install --upgrade typing_extensions |
Good practice alert !! 👉 Rather than installing typing_extensions at the Dockerfile level, it should be added to the requirements.txt file !! |
It works for me if I pull the repository, edit the dockerfile and then launch using docker from the command line. Has anyone gotten this working in Portainer? I found an example in a post here on how to add this as a stack in Portainer here but I get this same error when I try to launch AUTOMATIC1111, but I have no idea how I would apply the fix to the configuration. I tried changing the "build: ..." line for the auto service to be the path where I cloned the repo (/home/username/stable-diffusion-webui-docker/services/AUTOMATIC1111) but when I tried to run it I still got the same error. |
I browsed to the container in the Portainer interface, clicked the Duplicate/Edit button, scrolled down and changed the command to: and redeployed. It runs for now. |
I get the error: [+] Building 0.0s (0/1) docker:default when trying this method but I have PIP installed here is my dockerfile: `RUN . /clone.sh stable-diffusion-webui-assets https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git 6f7db241d2f8ba7457bac5ca9753331f0c266917 RUN . /clone.sh stable-diffusion-stability-ai https://github.com/Stability-AI/stablediffusion.git cf1d67a6fd5ea1aa600c4df58e5b47da45f6bdbf RUN . /clone.sh BLIP https://github.com/salesforce/BLIP.git 48211a1594f1321b00f14c9f7a5b4813144b2fb9 FROM pytorch/pytorch:2.3.0-cuda12.1-cudnn8-runtime ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 RUN --mount=type=cache,target=/var/cache/apt we need thoseapt-get install -y fonts-dejavu-core rsync git jq moreutils aria2 \ extensions needs thoseffmpeg libglfw3-dev libgles2-mesa-dev pkg-config libcairo2 libcairo2-dev build-essential WORKDIR / ENV ROOT=/stable-diffusion-webui COPY --from=download /repositories/ ${ROOT}/repositories/ RUN --mount=type=cache,target=/root/.cache/pip there seems to be a memory leak (or maybe just memory not being freed fast enough) that is fixed by this version of mallocmaybe move this up to the dependencies list.RUN apt-get -y install libgoogle-perftools-dev && apt-get clean COPY . /docker RUN \ mv ${ROOT}/style.css ${ROOT}/user.css && \one of the ugliest hacks I ever wrote \sed -i 's/in_app_dir = ./in_app_dir = True/g' /opt/conda/lib/python3.10/site-packages/gradio/routes.py && WORKDIR ${ROOT} ` |
This worked for me |
Hi,
I have error on command "docker compose --profile auto up --build"
ImportError: cannot import name 'TypeIs' from 'typing_extensions' (/opt/conda/lib/python3.10/site-packages/typing_extensions.py)
The text was updated successfully, but these errors were encountered: