louispaulet / tortoise-tts-docker

Tortoise TTS Fast on docker
22 stars 13 forks source link

Hello and Thanks #1

Open havok2-htwo opened 1 year ago

havok2-htwo commented 1 year ago

Hello, thanks for the Docker-Tortoise, I am relatively new to Anaconda and also to Docker. I tried creating a new Env and activated it, also I am in the directory by cd. I installed docker and docker-compose.

conda create --name TTF conda activate TTF cd.....

conda install -c conda-forge docker conda install -c "conda-forge/label/cf202003" docker

conda install -c conda-forge docker-compose conda install -c "conda-forge/label/cf201901" docker-compose conda install -c "conda-forge/label/cf202003" docker-compose

git clone https://github.com/louispaulet/tortoise-tts-docker.git cd tortoise-tts-docker

but when I try

docker-compose up --build

I get an error:

Traceback (most recent call last): File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\api\client.py", line 214, in _retrieve_server_version return self.version(api_version=False)["ApiVersion"] File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\api\daemon.py", line 181, in version return self._result(self._get(url), json=True) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\utils\decorators.py", line 46, in inner return f(self, args, kwargs) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\api\client.py", line 237, in _get return self.get(url, self._set_request_timeout(kwargs)) File "C:\Users\havok2.conda\envs\TTF\lib\site-packages\requests\sessions.py", line 600, in get return self.request("GET", url, kwargs) File "C:\Users\havok2.conda\envs\TTF\lib\site-packages\requests\sessions.py", line 587, in request resp = self.send(prep, send_kwargs) File "C:\Users\havok2.conda\envs\TTF\lib\site-packages\requests\sessions.py", line 701, in send r = adapter.send(request, kwargs) File "C:\Users\havok2.conda\envs\TTF\lib\site-packages\requests\adapters.py", line 489, in send resp = conn.urlopen( File "C:\Users\havok2.conda\envs\TTF\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen httplib_response = self._make_request( File "C:\Users\havok2.conda\envs\TTF\lib\site-packages\urllib3\connectionpool.py", line 398, in _make_request conn.request(method, url, httplib_request_kw) File "C:\Users\havok2.conda\envs\TTF\lib\http\client.py", line 1285, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\havok2.conda\envs\TTF\lib\http\client.py", line 1331, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\havok2.conda\envs\TTF\lib\http\client.py", line 1280, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\havok2.conda\envs\TTF\lib\http\client.py", line 1040, in _send_output self.send(msg) File "C:\Users\havok2.conda\envs\TTF\lib\http\client.py", line 980, in send self.connect() File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\transport\npipeconn.py", line 29, in connect sock.connect(self.npipe_path) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\transport\npipesocket.py", line 22, in wrapped return f(self, args, **kwargs) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\transport\npipesocket.py", line 71, in connect raise e File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\transport\npipesocket.py", line 51, in connect handle = win32file.CreateFile( pywintypes.error: (2, 'CreateFile', 'Das System kann die angegebene Datei nicht finden.')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\havok2.conda\envs\TTF\Scripts\docker-compose-script.py", line 10, in sys.exit(main()) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\compose\cli\main.py", line 81, in main command_func() File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\compose\cli\main.py", line 200, in perform_command project = project_from_options('.', options) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\compose\cli\command.py", line 60, in project_from_options return get_project( File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\compose\cli\command.py", line 152, in get_project client = get_client( File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\compose\cli\docker_client.py", line 41, in get_client client = docker_client( File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\compose\cli\docker_client.py", line 170, in docker_client client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs) File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\api\client.py", line 197, in init self._version = self._retrieve_server_version() File "C:\Users\havok2\AppData\Roaming\Python\Python39\site-packages\docker\api\client.py", line 221, in _retrieve_server_version raise DockerException( docker.errors.DockerException: Error while fetching server API version: (2, 'CreateFile', 'Das System kann die angegebene Datei nicht finden.')

What did I missed? Thanks for the help!!!

louispaulet commented 1 year ago

Dear havok2-htwo,

Thank you for trying to use this project.
Sadly, even though it worked on my computer (I was able to generate a few sentences), I could not use it as my GTX1080 could not handle the VRAM requirement (each new batch doesn't free the memory efficiently).
You will need at least 12Go VRAM, and probably 15Go if you want to prevent frequent restarts between config changes.

I am currently using this version: https://colab.research.google.com/drive/1E4_KeWdPG41YOn5KRJ9l2oQ2Od8Zeh_o
I have a paid google colab, and this method allows me to generate 2 sentences in 30 seconds for FAST setting, and 2m30s for HIGH_QUALITY setting.

With that being said, I did not do this part:

conda create --name TTF
conda activate TTF
cd.....

conda install -c conda-forge docker
conda install -c "conda-forge/label/cf202003" docker

conda install -c conda-forge docker-compose
conda install -c "conda-forge/label/cf201901" docker-compose
conda install -c "conda-forge/label/cf202003" docker-compose

I simply clone the repo and run docker compose up --build.
Also, note that I built this setup using WSL2 with docker windows, on windows 10.

If you are not using WSL2, or the client.py file from project Tortoise-TTS-Fast changed since my last use of this project, then it could explain the issue you are facing.

Please check that you have the file structure that is declared in the docker-compose and Dockerfile (do you have a "data" and "output" folder at the base of the project ?).

louispaulet commented 1 year ago

Also, here is some troubleshooting from stack overflow:

https://stackoverflow.com/questions/42052270/docker-compose-up-gives-the-system-cannot-find-the-file-specified-error

snufas commented 1 year ago

@louispaulet

Hello i got the docker running but when ever i am trying to open the url i am geting the following:

AttributeError: module 'dbm.gnu' has no attribute 'open' Traceback: File "/miniconda/envs/ttts-fast/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script exec(code, module.dict) File "/app/tortoise-tts-fast/scripts/app.py", line 278, in main() File "/app/tortoise-tts-fast/scripts/app.py", line 34, in main conf = TortoiseConfig() File "/app/tortoise-tts-fast/app_utils/conf.py", line 36, in init super().init(**data) File "/app/tortoise-tts-fast/app_utils/conf.py", line 18, in init with shelve.open("config.db") as db: File "/miniconda/envs/ttts-fast/lib/python3.8/shelve.py", line 243, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/miniconda/envs/ttts-fast/lib/python3.8/shelve.py", line 227, in init Shelf.init(self, dbm.open(filename, flag), protocol, writeback) File "/miniconda/envs/ttts-fast/lib/python3.8/dbm/init.py", line 95, in open return mod.open(file, flag, mode)

louispaulet commented 1 year ago

Sorry about your issue, I did not have this problem when I tried the project 2 weeks ago.
I am archiving the project to better signify that this version has no support, and like above, I actually recommend to use the google colab version, which is supported by the TortoiseTTS-Fast community.

Here is the notebook up to date:

https://github.com/152334H/tortoise-tts-fast/blob/main/tortoise_tts.ipynb