I have a certain code developed using Docker, and Docker-compose. When I want to start the images that I have build using:
sudo docker-compose -f docker-services-dev.yml up -d
I get the following error:
/home/ubuntu/.local/lib/python3.6/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography and will be removed in a future release.
from cryptography.hazmat.backends import default_backend
WARNING: Found orphan containers (c4kafka_zookeeper_1, c4kafka_kafka_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Recreating c4kafka_capture_1 ... done
Recreating c4kafka_detection_1 ... error
Recreating c4kafka_sender_1 ...
Recreating c4kafka_tracking_1 ...
ERROR: for c4kafka_detection_1 Cannot start service detection: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig.real --device=all --compute --compat32 --graphics --utility --video --display --pid=1998 /var/lib/docker/overlay2/81241e5a3cbe27712710e1bc3621781c9419021e2a7b42e4f45852d2fafc6801/merged]
Recreating c4kafka_sender_1 ... done
Recreating c4kafka_tracking_1 ... done
ERROR: for detection Cannot start service detection: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: exec command: [/usr/bin/nvidia-container-cli --load-kmods configure --ldconfig=@/sbin/ldconfig.real --device=all --compute --compat32 --graphics --utility --video --display --pid=1998 /var/lib/docker/overlay2/81241e5a3cbe27712710e1bc3621781c9419021e2a7b42e4f45852d2fafc6801/merged]
nvidia-container-cli: mount error: file creation failed: /var/lib/docker/overlay2/81241e5a3cbe27712710e1bc3621781c9419021e2a7b42e4f45852d2fafc6801/merged/usr/lib/libvisionworks.so: file exists: unknown
ERROR: Encountered errors while bringing up the project.
The docker-services-dev.yml file is the following:
version: '3.8'
services:
# Services of each module needed for the project.
capture:
build:
context: ../c4capture
dockerfile: Dockerfile
# Name of the json file with module configuration
args:
JSON_FILE: capture
UTILS_VERSION: "latest"
volumes:
- ../images:/home/images
restart: unless-stopped
# Secrets wanted to pass to the module
secrets:
- camera_config-username
- camera_config-password
- camera_config-url
detection:
build:
context: ../c4detection
dockerfile: Dockerfile
# Name of the json file with module configuration
args:
JSON_FILE: detection
UTILS_VERSION: "latest"
# Path of the neural network and name of the weights folder
volumes:
- ../images:/home/images
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
tracking:
build:
context: ../c4tracking
dockerfile: Dockerfile
# Name of the json file with module configuration
args:
JSON_FILE: tracking
SHAPES_FILE: shapes
UTILS_VERSION: "latest"
# Path of the neural network and name of the weights folder
volumes:
- ../images:/home/images
restart: unless-stopped
sender:
build:
context: ../c4sender
dockerfile: Dockerfile
# Name of the json file with module configuration
args:
JSON_FILE: sender
UTILS_VERSION: "latest"
volumes:
- ../images:/home/images
restart: unless-stopped
# Secrets wanted to pass to the module
secrets:
- database_config-url
- database_config-token
- database_config-token2
# Set all service secrets and their file location
secrets:
camera_config-url:
file: ./secrets/camera_config-url.txt
camera_config-username:
file: ./secrets/camera_config-username.txt
camera_config-password:
file: ./secrets/camera_config-password.txt
# ftp_config-ip:
# file: ./secrets/ftp_config-ip.txt
# ftp_config-username:
# file: ./secrets/ftp_config-username.txt
# ftp_config-password:
# file: ./secrets/ftp_config-password.txt
database_config-url:
file: ./secrets/database_config-url.txt
database_config-token:
file: ./secrets/database_config-token.txt
database_config-token2:
file: ./secrets/database_config-token2.txt
If I comment the lines of
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [ gpu ]
in the c4Detection module, then I can build all the containers, but c4Detection docker still crashes due to libcurand.so.10. I think that the error is because I have L4T-R32.3.1. installed on the Jetson TX2, and to run YOLOv5 we need PyTorch 1.8 which can't be installed. Is this the reason?