Error runnning the facenet notebook

Hi, I was trying to run facenet.ipynb, but the dataset_convert process went wrong and gave me this error code down here. The error code was exactly the same as this topic here.

However, our the situations are different; I’m using tlt-3.0 instead of tlt-2.0. So the way to solve the known issue doesn’t apply to my xase. I setup my environment by following the instructions in the document. Could anybody teach me how to solve this problem?

# Creating a new directory for the output tfrecords dump.
!tlt detectnet_v2 dataset_convert *
** -d $SPECS_DIR/facenet_tfrecords_kitti_train.txt *

** -o $DATA_DOWNLOAD_DIR/tfrecords/training/kitti_train**

Converting Tfrecords for wider train dataset
Traceback (most recent call last):
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 677, in urlopen
chunked=chunked,
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File “/usr/lib/python3.6/http/client.py”, line 1281, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1327, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1276, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1042, in _send_output
self.send(msg)
File “/usr/lib/python3.6/http/client.py”, line 980, in send
self.connect()
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/transport/unixconn.py”, line 43, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/requests/adapters.py”, line 449, in send
timeout=timeout
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 727, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/util/retry.py”, line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/packages/six.py”, line 734, in reraise
raise value.with_traceback(tb)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 677, in urlopen
chunked=chunked,
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File “/usr/lib/python3.6/http/client.py”, line 1281, in request
self._send_request(method, url, body, headers, encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1327, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1276, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File “/usr/lib/python3.6/http/client.py”, line 1042, in _send_output
self.send(msg)
File “/usr/lib/python3.6/http/client.py”, line 980, in send
self.connect()
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/transport/unixconn.py”, line 43, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, PermissionError(13, ‘Permission denied’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/api/client.py”, line 205, in _retrieve_server_version
return self.version(api_version=False)[“ApiVersion”]
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/api/daemon.py”, line 181, in version
return self._result(self._get(url), json=True)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/utils/decorators.py”, line 46, in inner
return f(self, *args, **kwargs)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/api/client.py”, line 228, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/requests/sessions.py”, line 543, in get
return self.request(‘GET’, url, **kwargs)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/requests/sessions.py”, line 530, in request
resp = self.send(prep, **send_kwargs)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/requests/sessions.py”, line 643, in send
r = adapter.send(request, **kwargs)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/requests/adapters.py”, line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, PermissionError(13, ‘Permission denied’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/rt/.virtualenvs/launcher/bin/tlt”, line 8, in
sys.exit(main())
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/tlt/entrypoint/entrypoint.py”, line 114, in main
args[1:]
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/tlt/components/instance_handler/local_instance.py”, line 250, in launch_command
docker_handler = self.handler_map[
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/tlt/components/instance_handler/local_instance.py”, line 107, in handler_map
docker_digest=map_val.docker_digest
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/tlt/components/docker_handler/docker_handler.py”, line 44, in init
self._docker_client = docker.from_env()
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/client.py”, line 85, in from_env
timeout=timeout, version=version, **kwargs_from_env(**kwargs)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/client.py”, line 40, in init
self.api = APIClient(*args, **kwargs)
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/api/client.py”, line 188, in init
self._version = self._retrieve_server_version()
File “/home/rt/.virtualenvs/launcher/lib/python3.6/site-packages/docker/api/client.py”, line 213, in _retrieve_server_version
‘Error while fetching server API version: {0}’.format(e)
docker.errors.DockerException: Error while fetching server API version: (‘Connection aborted.’, PermissionError(13, ‘Permission denied’))

Please refer to Error when trying to run gazenet notebook - #18 by Morganh

Pay attention to -v /var/run/docker.sock:/var/run/docker.sock

I solved it, It was the permission issue.
By running these command down here, the data conversion process worked just fine!

sudo groupadd docker
sudo usermod -aG docker ${USER}
sudo chmod 666 /var/run/docker.sock
sudo systemctl restart docker
sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
sudo chmod g+rwx "/home/$USER/.docker" -R
1 Like

Thanks for the info! Appreciate your work!