      """ Display installation Tips """
      @classmethod
      def docker_no_cuda(cls) -> None:
          """ Output Tips for Docker without Cuda """
          path = os.path.dirname(os.path.realpath(__file__))
          logger.info(
              "1. Install Docker\n"
              "https://www.docker.com/community-edition\n\n"
              "2. Build Docker Image For Faceswap\n"
              "docker build -t deepfakes-cpu -f Dockerfile.cpu .\n\n"
 
</s> remove         path = os.path.dirname(os.path.realpath(__file__))
 </s> add  </s> remove             "1. Install Docker\n"
            "https://www.docker.com/community-edition\n\n"
            "2. Build Docker Image For Faceswap\n"
            "docker build -t deepfakes-cpu -f Dockerfile.cpu .\n\n"
            "3. Mount faceswap volume and Run it\n"
            "# without GUI\n"
            "docker run -tid -p 8888:8888 \\ \n"
            "\t--hostname deepfakes-cpu --name deepfakes-cpu \\ \n"
            "\t-v %s:/srv \\ \n"
            "\tdeepfakes-cpu\n\n"
            "# with gui. tools.py gui working.\n"
            "## enable local access to X11 server\n"
            "xhost +local:\n"
            "## create container\n"
            "nvidia-docker run -tid -p 8888:8888 \\ \n"
            "\t--hostname deepfakes-cpu --name deepfakes-cpu \\ \n"
            "\t-v %s:/srv \\ \n"
            "\t-v /tmp/.X11-unix:/tmp/.X11-unix \\ \n"
            "\t-e DISPLAY=unix$DISPLAY \\ \n"
            "\t-e AUDIO_GID=`getent group audio | cut -d: -f3` \\ \n"
            "\t-e VIDEO_GID=`getent group video | cut -d: -f3` \\ \n"
            "\t-e GID=`id -g` \\ \n"
            "\t-e UID=`id -u` \\ \n"
            "\tdeepfakes-cpu \n\n"
            "4. Open a new terminal to run faceswap.py in /srv\n"
            "docker exec -it deepfakes-cpu bash", path, path)
        logger.info("That's all you need to do with a docker. Have fun.")
 </s> add             "1. Install Docker from: https://www.docker.com/get-started\n\n"
            "2. Enter the Faceswap folder and build the Docker Image For Faceswap:\n"
            "   docker build -t faceswap-cpu -f Dockerfile.cpu .\n\n"
            "3. Launch and enter the Faceswap container:\n"
            "  a. Headless:\n"
            "     docker run --rm -it -v ./:/srv faceswap-cpu\n\n"
            "  b. GUI:\n"
            "     xhost +local: && \\ \n"
            "     docker run --rm -it \\ \n"
            "     -v ./:/srv \\ \n"
            "     -v /tmp/.X11-unix:/tmp/.X11-unix \\ \n"
            "     -e DISPLAY=${DISPLAY} \\ \n"
            "     faceswap-cpu \n")
        logger.info("That's all you need to do with docker. Have fun.") </s> remove             "1. Install Docker\n"
            "https://www.docker.com/community-edition\n\n"
            "2. Install latest CUDA\n"
            "CUDA: https://developer.nvidia.com/cuda-downloads\n\n"
            "3. Install Nvidia-Docker & Restart Docker Service\n"
            "https://github.com/NVIDIA/nvidia-docker\n\n"
            "4. Build Docker Image For Faceswap\n"
            "docker build -t deepfakes-gpu -f Dockerfile.gpu .\n\n"
            "5. Mount faceswap volume and Run it\n"
            "# without gui \n"
            "docker run -tid -p 8888:8888 \\ \n"
            "\t--hostname deepfakes-gpu --name deepfakes-gpu \\ \n"
            "\t-v %s:/srv \\ \n"
            "\tdeepfakes-gpu\n\n"
            "# with gui.\n"
            "## enable local access to X11 server\n"
            "xhost +local:\n"
            "## enable nvidia device if working under bumblebee\n"
            "echo ON > /proc/acpi/bbswitch\n"
            "## create container\n"
            "nvidia-docker run -tid -p 8888:8888 \\ \n"
            "\t--hostname deepfakes-gpu --name deepfakes-gpu \\ \n"
            "\t-v %s:/srv \\ \n"
            "\t-v /tmp/.X11-unix:/tmp/.X11-unix \\ \n"
            "\t-e DISPLAY=unix$DISPLAY \\ \n"
            "\t-e AUDIO_GID=`getent group audio | cut -d: -f3` \\ \n"
            "\t-e VIDEO_GID=`getent group video | cut -d: -f3` \\ \n"
            "\t-e GID=`id -g` \\ \n"
            "\t-e UID=`id -u` \\ \n"
            "\tdeepfakes-gpu\n\n"
            "6. Open a new terminal to interact with the project\n"
            "docker exec deepfakes-gpu python /srv/faceswap.py gui\n",
            path, path)
 </s> add             "1. Install Docker from: https://www.docker.com/get-started\n\n"
            "2. Install latest CUDA 11 and cuDNN 8 from: https://developer.nvidia.com/cuda-"
            "downloads\n\n"
            "3. Install the the Nvidia Container Toolkit from https://docs.nvidia.com/datacenter/"
            "cloud-native/container-toolkit/latest/install-guide\n\n"
            "4. Restart Docker Service\n\n"
            "5. Enter the Faceswap folder and build the Docker Image For Faceswap:\n"
            "   docker build -t faceswap-gpu -f Dockerfile.gpu .\n\n"
            "6. Launch and enter the Faceswap container:\n"
            "  a. Headless:\n"
            "     docker run --runtime=nvidia --rm -it -v ./:/srv faceswap-gpu\n\n"
            "  b. GUI:\n"
            "     xhost +local: && \\ \n"
            "     docker run --runtime=nvidia --rm -it \\ \n"
            "     -v ./:/srv \\ \n"
            "     -v /tmp/.X11-unix:/tmp/.X11-unix \\ \n"
            "     -e DISPLAY=${DISPLAY} \\ \n"
            "     faceswap-gpu \n")
        logger.info("That's all you need to do with docker. Have fun.") </s> remove                 is_cr = line.startswith("\r")
                line = line.rstrip()

                if line and not is_cr:
                    if self._last_line_cr:
                        self._last_line_cr = False
                        # Go to next line
                        self._non_gui_print("")
                    self._seen_line_log(line)
                elif line:
                    self._last_line_cr = True
                    logger.debug(line)
                    self._non_gui_print("", end="\r")
 </s> add                 for line in lines.split(b"\r"):
                    self._seen_line_log(line.decode("utf-8", errors="replace").rstrip())
                    self._non_gui_print(line)
 </s> remove     def _install_missing_dep(self) -> None:
        """ Install missing dependencies """
        self._install_conda_packages()  # Install conda packages first
        self._install_python_packages()
 </s> add     def _install_conda_packages(self) -> None:
        """ Install required conda packages """
        logger.info("Installing Required Conda Packages. This may take some time...")
        for pkg in self._packages.to_install_conda:
            channel = "" if len(pkg) != 2 else pkg[1]
            self._from_conda(pkg[0], channel=channel, conda_only=True)
      """ Display installation Tips """
      @classmethod
      def docker_no_cuda(cls) -> None:
          """ Output Tips for Docker without Cuda """

          logger.info(
              "1. Install Docker\n"
              "https://www.docker.com/community-edition\n\n"
              "2. Build Docker Image For Faceswap\n"
              "docker build -t deepfakes-cpu -f Dockerfile.cpu .\n\n"
keep keep keep keep replace keep keep keep keep keep
 Rebase code (#1326)

* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test 
setup.py