Nvidia-Docker
Currently, NvDocker doesn’t support TX1/TX2. But we may enable this on NvDocker2.0
But there is some alternative from the community. You can check if it helps:
The Tegra-Docker solution works (I have verified), but still feels a little like a work-around. Also, I believe the docker version (1.12.6 currently) they recommend is a little dated and points to amd64 instead of arm64. The docker package still works though. BTW, the Tegra-Docker solution sources the Jetsonhacks blog (link below) for custom kernel build instructions…
CUDA Device Query (Runtime API) version (CUDART static linking)
Detected 1 CUDA Capable device(s)
Device 0: “NVIDIA Tegra X1”
CUDA Driver Version / Runtime Version 8.0 / 8.0
CUDA Capability Major/Minor version number: 5.3
Total amount of global memory: 3981 MBytes (4174815232 bytes)
( 2) Multiprocessors, (128) CUDA Cores/MP: 256 CUDA Cores
GPU Max Clock rate: 998 MHz (1.00 GHz)
Memory Clock rate: 13 Mhz
Memory Bus Width: 64-bit
L2 Cache Size: 262144 bytes
Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers
Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers
Total amount of constant memory: 65536 bytes
Total amount of shared memory per block: 49152 bytes
Total number of registers available per block: 32768
Warp size: 32
Maximum number of threads per multiprocessor: 2048
Maximum number of threads per block: 1024
Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535)
Maximum memory pitch: 2147483647 bytes
Texture alignment: 512 bytes
Concurrent copy and kernel execution: Yes with 1 copy engine(s)
Run time limit on kernels: Yes
Integrated GPU sharing Host Memory: Yes
Support host page-locked memory mapping: Yes
Alignment requirement for Surfaces: Yes
Device has ECC support: Disabled
Device supports Unified Addressing (UVA): Yes
Device PCI Domain ID / Bus ID / location ID: 0 / 0 / 0
Compute Mode:
< Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 8.0, CUDA Runtime Version = 8.0, NumDevs = 1, Device0 = NVIDIA Tegra X1
Result = PASS
nvidia@tegra-ubuntu:~$ sudo apt-get install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
apt-clone archdetect-deb dmeventd dmraid dpkg-repack gir1.2-timezonemap-1.0
gir1.2-xkl-1.0 kpartx kpartx-boot libappstream3 libdebian-installer4
libdevmapper-event1.02.1 libdmraid1.0.0.rc16 liblockfile-bin liblockfile1
liblvm2app2.2 liblvm2cmd2.02 libmircommon5 libparted-fs-resize0 libreadline5
lockfile-progs lvm2 os-prober pmount python3-icu python3-pam rdate
ubiquity-casper ubiquity-ubuntu-artwork ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
Suggested packages:
aufs-tools debootstrap docker-doc rinse zfs-fuse | zfsutils
The following NEW packages will be installed:
docker.io
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/9,223 kB of archives.
After this operation, 53.6 MB of additional disk space will be used.
Selecting previously unselected package docker.io.
(Reading database ... 194483 files and directories currently installed.)
Preparing to unpack .../docker.io_1.12.6-0ubuntu1~16.04.1_arm64.deb ...
Unpacking docker.io (1.12.6-0ubuntu1~16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu19) ...
Setting up docker.io (1.12.6-0ubuntu1~16.04.1) ...
addgroup: The group `docker' already exists as a system group. Exiting.
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-10-06 18:34:35 UTC; 26ms ago
Docs: https://docs.docker.com
Process: 25151 ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
Main PID: 25151 (code=exited, status=1/FAILURE)
CPU: 297ms
CGroup: /system.slice/docker.service
Oct 06 18:34:34 tegra-ubuntu systemd[1]: Starting Docker Application Contain....
Oct 06 18:34:34 tegra-ubuntu dockerd[25151]: time="2017-10-06T18:34:34.26151..."
Oct 06 18:34:35 tegra-ubuntu dockerd[25151]: time="2017-10-06T18:34:35.33394..."
Oct 06 18:34:35 tegra-ubuntu dockerd[25151]: time="2017-10-06T18:34:35.95570..."
Oct 06 18:34:35 tegra-ubuntu systemd[1]: docker.service: Main process exited...E
Oct 06 18:34:35 tegra-ubuntu systemd[1]: Failed to start Docker Application ....
Oct 06 18:34:35 tegra-ubuntu systemd[1]: docker.service: Unit entered failed....
Oct 06 18:34:35 tegra-ubuntu systemd[1]: docker.service: Failed with result ....
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package docker.io (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (229-4ubuntu19) ...
Errors were encountered while processing:
docker.io
E: Sub-process /usr/bin/dpkg returned an error code (1)
I don’t know about docker, but it is usually an error on the part of the package maintainer to activate a service upon install if configuration is required to make the service work. That message says docker is run as a service via systemctl, and that startup failed…the installation looks like it was ok. Do whatever configuration is needed, then try to start docker.
Here is the output of those commands which you mentioned:
nvidia@tegra-ubuntu:~$ sudo systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: e
Active: failed (Result: exit-code) since Sun 2017-10-08 20:28:32 UTC; 23s ago
Docs: https://docs.docker.com
Main PID: 22437 (code=exited, status=1/FAILURE)
Oct 08 20:28:30 tegra-ubuntu systemd[1]: Starting Docker Application Container E
Oct 08 20:28:30 tegra-ubuntu dockerd[22437]: time="2017-10-08T20:28:30.950454000
Oct 08 20:28:32 tegra-ubuntu dockerd[22437]: time="2017-10-08T20:28:32.029422000
Oct 08 20:28:32 tegra-ubuntu dockerd[22437]: time="2017-10-08T20:28:32.571201000
Oct 08 20:28:32 tegra-ubuntu systemd[1]: docker.service: Main process exited, co
Oct 08 20:28:32 tegra-ubuntu systemd[1]: Failed to start Docker Application Cont
Oct 08 20:28:32 tegra-ubuntu systemd[1]: docker.service: Unit entered failed sta
Oct 08 20:28:32 tegra-ubuntu systemd[1]: docker.service: Failed with result 'exi
nvidia@tegra-ubuntu:~$ sudo systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
nvidia@tegra-ubuntu:~$ sudo systemctl stop docker.service
nvidia@tegra-ubuntu:~$ sudo systemctl disable docker.service
Synchronizing state of docker.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable docker
insserv: warning: current start runlevel(s) (empty) of script `docker' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `docker' overrides LSB defaults (0 1 6).
nvidia@tegra-ubuntu:~$ sudo systemctl enable docker.service
Synchronizing state of docker.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable docker
insserv: warning: current start runlevel(s) (empty) of script `docker' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `docker' overrides LSB defaults (0 1 6).
nvidia@tegra-ubuntu:~$ docker
Usage: docker [OPTIONS] COMMAND [arg...]
docker [ --help | -v | --version ]
A self-sufficient runtime for containers.
Options:
--config=~/.docker Location of client config files
-D, --debug Enable debug mode
-H, --host=[] Daemon socket(s) to connect to
-h, --help Print usage
-l, --log-level=info Set the logging level
--tls Use TLS; implied by --tlsverify
--tlscacert=~/.docker/ca.pem Trust certs signed only by this CA
--tlscert=~/.docker/cert.pem Path to TLS certificate file
--tlskey=~/.docker/key.pem Path to TLS key file
--tlsverify Use TLS and verify the remote
-v, --version Print version information and quit
Commands:
attach Attach to a running container
build Build an image from a Dockerfile
commit Create a new image from a container's changes
cp Copy files/folders between a container and the local filesystem
create Create a new container
diff Inspect changes on a container's filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container's filesystem as a tar archive
history Show the history of an image
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on a container, image or task
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
login Log in to a Docker registry.
logout Log out from a Docker registry.
logs Fetch the logs of a container
network Manage Docker networks
node Manage Docker Swarm nodes
pause Pause all processes within one or more containers
port List port mappings or a specific mapping for the container
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart a container
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search the Docker Hub for images
service Manage Docker services
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
swarm Manage Docker Swarm
tag Tag an image into a repository
top Display the running processes of a container
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
version Show the Docker version information
volume Manage Docker volumes
wait Block until a container stops, then print its exit code
Run 'docker COMMAND --help' for more information on a command.
nvidia@tegra-ubuntu:~$ docker build -t openhorizon/caffe-tx1 .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/nvidia/Dockerfile: no such file or directory
So docker is there, but the service won’t start due to errors (the package which installed this should not have enabled docker since docker seems to require configuration in order to start). I believe the errors are that docker was not configured. You’ll probably have to research what configuration is needed before “sudo start docker.service” works.
You’ll see in the start command the failure shows you might get more information if you run this:
sudo journalctl -xe
If someone here has configured docker before they might be able to tell you more about where to start with docker configuration.
If you are having problems with Docker starting you need to first verify that the kernel you are running can support Docker. Docker has a script that you can use to verify that your kernel has the correct options enabled. You can find that script here: [url]https://github.com/moby/moby/blob/master/contrib/check-config.sh[/url]
The comment #2 is based on branch rel-24.2, which is installed with JetPack3.0.
If you are with JetPack3.1, please enable the required kernel configuration first.
We have upgraded our branch from rel-27.1 to rel-28.1.
The patch can’t be used directly. Please following the modification, enable the corresponding kernel flag.
Hi, thank you for your reply. I successfully install docker in the “JetPack 3.0”
However, because we need “JetPack 2.2.1” 32bit system in TX1, could it possible to install docker on this version of JetPack? What should I do to make it work?
There is an armhf docker package although we don’t have too much experience on it.
If you can’t install it by default, this topic can give you some hint to enable the required kernel flag.
Hi all,
I am desperately trying to get docker to run in TX2 / Jetpack 3.1. No luck.
I followed the steps listed in this thread: https://devtalk.nvidia.com/default/topic/1000224/jetson-tx2/docker-on-the-tx2/post/5117731/#5117731.
After I run getKernelSources.sh, stop the kernel editor and copy the config file, the build stats to ask me a set of configuration things. I do not know how respond to them (I pressed enter to all).
when I run makeKernel.sh I am getting this errors:
In file included from include/linux/platform/tegra/mc.h:22:0,
from drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.c:17:
include/linux/platform/tegra/tegra_mc.h: In function ‘mc_get_carveout_info’:
include/linux/platform/tegra/tegra_mc.h:77:10: error: ‘ENODEV’ undeclared (first use in this function)
return -ENODEV;
^
include/linux/platform/tegra/tegra_mc.h:77:10: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:261: recipe for target 'drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.o' failed
make[5]: *** [drivers/../../t18x/drivers/platform/tegra/mc/tegra18_emc.o] Error 1
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers/platform/tegra/mc' failed
make[4]: *** [drivers/../../t18x/drivers/platform/tegra/mc] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers/platform/tegra' failed
make[3]: *** [drivers/../../t18x/drivers/platform/tegra] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers/platform' failed
make[2]: *** [drivers/../../t18x/drivers/platform] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/../../t18x/drivers' failed
make[1]: *** [drivers/../../t18x/drivers] Error 2
make[1]: *** Waiting for unfinished jobs....
GZIP kernel/config_data.gz
CHK kernel/config_data.h
UPD kernel/config_data.h
CC kernel/configs.o
In file included from include/soc/tegra/tegra_powergate.h:21:0,
from drivers/ata/tegra/ahci_tegra.c:20:
include/linux/tegra-powergate.h:74:19: error: redefinition of ‘tegra_powergate_is_powered’
static inline int tegra_powergate_is_powered(int id)
^
In file included from drivers/ata/tegra/ahci_tegra.h:30:0,
from drivers/ata/tegra/ahci_tegra.c:17:
include/soc/tegra/pmc.h:131:19: note: previous definition of ‘tegra_powergate_is_powered’ was here
static inline int tegra_powergate_is_powered(int id)
^
In file included from include/soc/tegra/tegra_powergate.h:21:0,
from drivers/ata/tegra/ahci_tegra.c:20:
include/linux/tegra-powergate.h:101:19: error: redefinition of ‘tegra_powergate_remove_clamping’
static inline int tegra_powergate_remove_clamping(int id)
^
In file included from drivers/ata/tegra/ahci_tegra.h:30:0,
from drivers/ata/tegra/ahci_tegra.c:17:
include/soc/tegra/pmc.h:146:19: note: previous definition of ‘tegra_powergate_remove_clamping’ was here
static inline int tegra_powergate_remove_clamping(int id)
^
include/soc/tegra/pmc.h:64:29: error: expected identifier or ‘(’ before numeric constant
#define TEGRA_POWERGATE_SOR 17
^
include/soc/tegra/tegra_powergate.h:28:12: note: in expansion of macro ‘TEGRA_POWERGATE_SOR’
extern int TEGRA_POWERGATE_SOR;
^
scripts/Makefile.build:261: recipe for target 'drivers/ata/tegra/ahci_tegra.o' failed
make[3]: *** [drivers/ata/tegra/ahci_tegra.o] Error 1
scripts/Makefile.build:406: recipe for target 'drivers/ata/tegra' failed
make[2]: *** [drivers/ata/tegra] Error 2
scripts/Makefile.build:406: recipe for target 'drivers/ata' failed
make[1]: *** [drivers/ata] Error 2
Makefile:973: recipe for target 'drivers' failed
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....
Of course, the new kernel image is never generated, so when I run copyImage.sh I am geting:
“cp: cannot stat ‘arch/arm64/boot/Image’: No such file or directory”
Could someone help me here?
Thank you,
Regards,
mtorre