tomas-gajarsky / facetorch

Python library for analysing faces using PyTorch
Apache License 2.0
487 stars 43 forks source link

"docker compose run facetorch-gpu python ./scripts/example.py analyzer.device=cuda " This command have problem #28

Closed ZHOUYU007 closed 1 year ago

ZHOUYU007 commented 1 year ago

[8/9] RUN pip install facetorch:

0 1.670 Collecting facetorch

0 2.313 Downloading facetorch-0.1.4-py3-none-any.whl (36 kB)

0 3.092 Collecting python-json-logger>=2.0.0

0 3.207 Downloading python_json_logger-2.0.4-py3-none-any.whl (7.8 kB)

0 3.878 Collecting torchvision>=0.10.0

0 4.098 Downloading torchvision-0.14.0-cp39-cp39-manylinux1_x86_64.whl (24.3 MB)

0 777.8 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.5/24.3 MB 36.2 kB/s eta 0:00:50

0 777.8 ERROR: Exception:

0 777.8 Traceback (most recent call last):

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 437, in _error_catcher

0 777.8 yield

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 560, in read

0 777.8 data = self._fp_read(amt) if not fp_closed else b""

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 526, in _fp_read

0 777.8 return self._fp.read(amt) if amt is not None else self._fp.read()

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/cachecontrol/filewrapper.py", line 90, in read

0 777.8 data = self.__fp.read(amt)

0 777.8 File "/usr/lib/python3.9/http/client.py", line 463, in read

0 777.8 n = self.readinto(b)

0 777.8 File "/usr/lib/python3.9/http/client.py", line 507, in readinto

0 777.8 n = self.fp.readinto(b)

0 777.8 File "/usr/lib/python3.9/socket.py", line 704, in readinto

0 777.8 return self._sock.recv_into(b)

0 777.8 File "/usr/lib/python3.9/ssl.py", line 1242, in recv_into

0 777.8 return self.read(nbytes, buffer)

0 777.8 File "/usr/lib/python3.9/ssl.py", line 1100, in read

0 777.8 return self._sslobj.read(len, buffer)

0 777.8 socket.timeout: The read operation timed out

0 777.8

0 777.8 During handling of the above exception, another exception occurred:

0 777.8

0 777.8 Traceback (most recent call last):

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper

0 777.8 status = run_func(*args)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/cli/req_command.py", line 247, in wrapper

0 777.8 return func(self, options, args)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/commands/install.py", line 400, in run

0 777.8 requirement_set = resolver.resolve(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve

0 777.8 result = self._result = resolver.resolve(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve

0 777.8 state = resolution.resolve(requirements, max_rounds=max_rounds)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 373, in resolve

0 777.8 failure_causes = self._attempt_to_pin_criterion(name)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 213, in _attempt_to_pin_criterion

0 777.8 criteria = self._get_updated_criteria(candidate)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 204, in _get_updated_criteria

0 777.8 self._add_to_criteria(criteria, requirement, parent=candidate)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria

0 777.8 if not criterion.candidates:

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/resolvelib/structs.py", line 151, in bool

0 777.8 return bool(self._sequence)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in bool

0 777.8 return any(self)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in

0 777.8 return (c for c in iterator if id(c) not in self._incompatible_ids)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built

0 777.8 candidate = func()

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link

0 777.8 self._link_candidate_cache[link] = LinkCandidate(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in init

0 777.8 super().init(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in init

0 777.8 self.dist = self._prepare()

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare

0 777.8 dist = self._prepare_distribution()

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution

0 777.8 return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement

0 777.8 return self._prepare_linked_requirement(req, parallel_builds)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/operations/prepare.py", line 536, in _prepare_linked_requirement

0 777.8 local_file = unpack_url(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/operations/prepare.py", line 166, in unpack_url

0 777.8 file = get_http_url(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/operations/prepare.py", line 107, in get_http_url

0 777.8 from_path, content_type = download(link, temp_dir.path)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/network/download.py", line 147, in call

0 777.8 for chunk in chunks:

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/cli/progress_bars.py", line 53, in _rich_progress_bar

0 777.8 for chunk in iterable:

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_internal/network/utils.py", line 63, in response_chunks

0 777.8 for chunk in response.raw.stream(

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 621, in stream

0 777.8 data = self.read(amt=amt, decode_content=decode_content)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 586, in read

0 777.8 raise IncompleteRead(self._fp_bytes_read, self.length_remaining)

0 777.8 File "/usr/lib/python3.9/contextlib.py", line 137, in exit

0 777.8 self.gen.throw(typ, value, traceback)

0 777.8 File "/usr/local/lib/python3.9/dist-packages/pip/_vendor/urllib3/response.py", line 442, in _error_catcher

0 777.8 raise ReadTimeoutError(self._pool, None, "Read timed out.")

0 777.8 pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.


failed to solve: executor failed running [/bin/sh -c pip install facetorch]: exit code: 2

tomas-gajarsky commented 1 year ago

I don't have a problem with the facetorch installation when running this command. Perhaps you have had some network problems since there were timed-out errors?

As a workaround you could:

  1. pull the pre-build GPU image from DockerHub: docker pull tomasgajarsky/facetorch-gpu:latest

  2. run the image as a container with attached GPUs and open the bash: docker run --gpus all -it tomasgajarsky/facetorch-gpu:latest bash

  3. run the example script in the image with Cuda device: python scripts/example.py analyzer.device=cuda

ZHOUYU007 commented 1 year ago

thank you  i will try again  

657972842 @.***

 

------------------ 原始邮件 ------------------ 发件人: "Tomas @.>; 发送时间: 2022年11月19日(星期六) 晚上6:43 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [tomas-gajarsky/facetorch] "docker compose run facetorch-gpu python ./scripts/example.py analyzer.device=cuda " This command have problem (Issue #28)

I don't have a problem with the facetorch installation when running this command. Perhaps you have had some network problems since there were timed-out errors?

As a workaround you could:

pull the pre-build GPU image from DockerHub: docker pull tomasgajarsky/facetorch-gpu:latest

run the image as a container with attached GPUs and open the bash: docker run --gpus all -it tomasgajarsky/facetorch-gpu:latest bash

run the example script in the image with Cuda device: python scripts/example.py analyzer.device=cuda

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>