https://github.com/open-edge-platform/edge-ai-suites/tree/main/metro-ai-suite/sensor-fusion-for-traffic-management/docker
Install Docker Engine and Docker Compose according to the guide on the official website.
Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker apt repository. Afterward, you can install and update Docker from the repository.
apt repository.bash# Add Docker's official GPG key: sudo -E apt-get update sudo -E apt-get install ca-certificates curl sudo -E install -m 0755 -d /etc/apt/keyrings sudo -E curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo -E apt-get update
To install the latest version, run:
bashsudo -E apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Note you may need to set proxy for docker.
bashsudo mkdir -p /etc/systemd/system/docker.service.d sudo vim /etc/systemd/system/docker.service.d/http-proxy.conf # Modify the file contents as follows [Service] Environment="HTTP_PROXY=http://proxy.example.com:8080" Environment="HTTPS_PROXY=http://proxy.example.com:8080" Environment="NO_PROXY=localhost,127.0.0.1"
Then restart docker:
bashsudo systemctl daemon-reload sudo systemctl restart docker
hello-world image:bashsudo docker run hello-world
This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.
bashsudo usermod -aG docker $USER newgrp docker
bashdocker pull ubuntu:24.04
bashbash install_driver_related_libs.sh
If driver are already installed on the machine, you don't need to do this step.
You can pull latest tfcc docker image through https://hub.docker.com/r/intel/tfcc/.
For example:
bashdocker pull intel/tfcc:latest
Note that the default username is
tfccand password isintelin docker image.
Build docker image
Usage:
bashbash build_docker.sh <IMAGE_TAG, default tfcc:latest> <DOCKERFILE, default Dockerfile_TFCC.dockerfile> <BASE, default ubuntu> <BASE_VERSION, default 24.04>
Example:
bashcd $PROJ_DIR/docker bash build_docker.sh tfcc:latest Dockerfile_TFCC.dockerfile
Run docker image
Usage:
bash run_docker.sh <DOCKER_IMAGE, default tfcc:latest> <NPU_ON, default false>
Example:
bashcd $PROJ_DIR/docker bash run_docker.sh tfcc:latest false # After the run is complete, the container ID will be output, or you can view it through docker ps
Enter docker
Get the container id by command bellow:
bashdocker ps -a
And then enter docker by command bellow:
bashdocker exec -it <container id> /bin/bash
Copy dataset
If you want to copy dataset or other files to docker, you can refer the command bellow:
bashdocker cp /path/to/dataset <container id>:/path/to/dataset
Note that the default username is
tfccand password isintelin docker image.
Modify proxy, VIDEO_GROUP_ID and RENDER_GROUP_ID in .env file.
bash# proxy settings https_proxy= http_proxy= # base image settings BASE=ubuntu BASE_VERSION=24.04 # group IDs for various services VIDEO_GROUP_ID=44 RENDER_GROUP_ID=110 # display settings DISPLAY=$DISPLAY
You can get VIDEO_GROUP_ID and RENDER_GROUP_ID with the following command:
bash# VIDEO_GROUP_ID echo $(getent group video | awk -F: '{printf "%s\n", $3}') # RENDER_GROUP_ID echo $(getent group render | awk -F: '{printf "%s\n", $3}')
Build and run docker image
Uasge:
bashcd $PROJ_DIR/docker docker compose up <services-name> -d # tfcc and tfcc-npu. tfcc-npu means with NPU support
Example:
bashcd $PROJ_DIR/docker docker compose up tfcc -d
Note if you need NPU support, for example, on MTL platform please run the command bellow:
bashcd $PROJ_DIR/docker docker compose up tfcc-npu -d
Enter docker
Usage:
bashdocker compose exec <services-name> /bin/bash
Example:
bashdocker compose exec tfcc /bin/bash
Copy dataset
Find the container name or ID:
bashdocker compose ps
Sample output:
bashNAME IMAGE COMMAND SERVICE CREATED STATUS PORTS docker-tfcc-1 tfcc:latest "/bin/bash" tfcc 4 minutes ago Up 9 seconds
copy dataset
bashdocker cp /path/to/dataset docker-tfcc-1:/path/to/dataset
Caution:
This container image is intended for demo purposes only and not intended for production use.
To receive expanded security maintenance from Canonical on the Ubuntu base layer, you may follow the how-to guide to enable Ubuntu Pro in a Dockerfile, which will require the image to be rebuilt.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务