Creating a Configuration File
(Optional) Ascend Docker Runtime mounts drivers and device-related files by default. The files are stored in base.list. If you need to mount all paths in the file, skip this section. If you do not need to mount all content in the basic configuration file base.list, you can reduce the content to be mounted by a custom configuration file. The mounting content of the custom configuration file must be based on the base.list file. The operations are as follows:
- Go to the configuration file directory:
cd /etc/ascend-docker-runtime.d/
The basic configuration file base.list already exists in the directory. The content is the default content mounted by the Ascend Docker Runtime. For details, see Default Content Mounted by the Ascend Docker Runtime. In principle, the base.list file cannot be modified.
- Create and edit the configuration file. The file name can be customized, for example, hostlog.list.
vi hostlog.list
- Write the files or directories to be mounted to hostlog.list.
- Save the configuration and exit.
- Make the hostlog.list file take effect. Example:
docker run --rm -it -e ASCEND_VISIBLE_DEVICES=0 -e ASCEND_RUNTIME_MOUNTS=hostlog image-name:tag /bin/bash
Parent topic: Using the Ascend Docker Runtime