(Optional) Configuring Custom Mounted Content
Ascend Docker Runtime automatically mounts the driver and all contents listed in the base configuration file /etc/ascend-docker-runtime.d/base.list by default. If you need to mount all paths in this file, you can skip this section. If you do not need to mount all contents in the base.list file, you can create a custom configuration file to reduce the mounted content. The custom configuration file must be based on the base.list file. The procedure is as follows:
-
Enter the configuration file directory.
cd /etc/ascend-docker-runtime.d/base.listalready exists in this directory. Its content is the default mounted content of Ascend Docker Runtime. For details, see Content Mounted by Ascend Docker Runtime. In principle, you are not allowed to modify thebase.listfile. -
Create a new configuration file. The file name can be customized, for example,
hostlog.list.vi hostlog.list -
Write the files or directories to be mounted into
hostlog.list, then save and exit. -
Run the command to make
hostlog.listtake effect. Example:docker run --rm -it -e ASCEND_VISIBLE_DEVICES=0 -e ASCEND_RUNTIME_MOUNTS=hostlog {image-name:tag} /bin/bashNote
- For descriptions of the
ASCEND_VISIBLE_DEVICESandASCEND_RUNTIME_MOUNTSparameters, see Table 1. - Custom mounted content is restricted by the default mount whitelist of Ascend Docker Runtime. For details, see Default Mount Whitelist of Ascend Docker Runtime.
- For descriptions of the