Hello all,
I refer to the “CUDA error: no kernel image is available for execution on the device” When linking to generate the pytorch image, I encountered a problem as shown below.
Step 22/30 : RUN git clone --recursive -b ${TORCHAUDIO_VERSION} https://github.com/pytorch/audio torchaudio && cd torchaudio && sed -i 's# URL https://zlib.net/zlib-1.2.11.tar.gz# URL https://zlib.net/zlib-1.2.12.tar.gz#g' third_party/zlib/CMakeLists.txt || echo "failed to patch torchaudio/third_party/zlib/CMakeLists.txt" && sed -i 's# URL_HASH SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1# URL_HASH SHA256=91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9#g' third_party/zlib/CMakeLists.txt || echo "failed to patch torchaudio/third_party/zlib/CMakeLists.txt" && BUILD_SOX=1 python3 setup.py install && cd ../ && rm -rf torchaudio
---> Running in 2b8d3b28cc86
Cloning into 'torchaudio'...
Note: switching to '2e1388401c434011e9f044b40bc8374f2ddfc414'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Submodule 'kaldi' (https://github.com/kaldi-asr/kaldi) registered for path 'third_party/kaldi/submodule'
Submodule 'third_party/kenlm/submodule' (https://github.com/kpu/kenlm) registered for path 'third_party/kenlm/submodule'
Cloning into '/torchaudio/third_party/kaldi/submodule'...
Cloning into '/torchaudio/third_party/kenlm/submodule'...
Submodule path 'third_party/kaldi/submodule': checked out '3eea37dd09b55064e6362216f7e9a60641f29f09'
Submodule path 'third_party/kenlm/submodule': checked out '5cea457db26950a73d638425c183b368c06ed7c6'
-- Git branch: HEAD
-- Git SHA: 2e1388401c434011e9f044b40bc8374f2ddfc414
-- Git tag: v0.12.0
-- PyTorch dependency: torch
-- Building version 0.12.0+2e13884
--- Initializing submodules
--- Initialized submodule
--- Fetching v1.2.12.tar.gz
Traceback (most recent call last):
File "setup.py", line 181, in <module>
_main()
File "setup.py", line 144, in _main
_fetch_third_party_libraries()
File "setup.py", line 128, in _fetch_third_party_libraries
_fetch_archives(_parse_sources())
File "setup.py", line 122, in _fetch_archives
torch.hub.download_url_to_file(url, dest, progress=False)
File "/usr/local/lib/python3.8/dist-packages/torch/hub.py", line 593, in download_url_to_file
u = urlopen(req)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 1397, in https_open
return self.do_open(http.client.HTTPSConnection, req,
File "/usr/lib/python3.8/urllib/request.py", line 1358, in do_open
r = h.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1348, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 316, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 285, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
The command '/bin/sh -c git clone --recursive -b ${TORCHAUDIO_VERSION} https://github.com/pytorch/audio torchaudio && cd torchaudio && sed -i 's# URL https://zlib.net/zlib-1.2.11.tar.gz# URL https://zlib.net/zlib-1.2.12.tar.gz#g' third_party/zlib/CMakeLists.txt || echo "failed to patch torchaudio/third_party/zlib/CMakeLists.txt" && sed -i 's# URL_HASH SHA256=c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1# URL_HASH SHA256=91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9#g' third_party/zlib/CMakeLists.txt || echo "failed to patch torchaudio/third_party/zlib/CMakeLists.txt" && BUILD_SOX=1 python3 setup.py install && cd ../ && rm -rf torchaudio' returned a non-zero code: 1
After running here, it will automatically end, but there is no corresponding docker image generation. The system has installed jetpack related software through sdkmanager, and the specific steps are as follows:
I commented out the unnecessary version of the “docker_build_ml.sh” script. Here is the file I changed.
docker_build_ml.sh (10.3 KB)
The modified /etc/docker/daemon.json file is as follows:
daemon.json (170 Bytes)
After modifying all the files, execute the following command:
./scripts/docker_build_ml.sh pytorch
Is there a good solution?