This project aims to build an image contains cuda, cudnn, onnx, ncnn, and tensorRT based on pros_base_image. All right reserved.
The GitHub Action has been set to run at 00:00 on the second of every month. This can help us to keep updating from the base image pros_base_image.
The tag of the Docker image has 2 formats:
- 0.0.0
- This is triggered by adding new tag manually.
- 0.0.0-20241002
- This is triggered by
cronwhich is set in theyamlfile.
- This is triggered by
The system architecture is shown in the LucidChart.
r: Docolcon buildandsourcethesetup.bashin the/workspacesfolder.b: launch ros bridge serverm:make -j
We've written a run command rebuild_colcon.rc in /workspaces folder. You can do colcon build and source /workspaces/install/setup.bash by the following command:
source /workspaces/rebuild_colcon.rcWe have written the command source /workspaces/rebuild_colcon.rc as an alias 'r' in both /root/.bashrc and /root/.zshrc. Users only need to type 'r' to execute the command.
The cache file size of the GitHub Actions must not greater than 10GB.
buildx failed with: ERROR: failed to solve: error writing layer blob: The cache file size must be between 0 and 10737418240 bytes. Current file size: 10770972672 bytes
-
To use buildx, make sure your Docker runtime is at least version 19.03. buildx actually comes bundled with Docker by default, but needs to be enabled by setting the environment variable DOCKER_CLI_EXPERIMENTAL.
export DOCKER_CLI_EXPERIMENTAL=enabled -
If you're on Linux, you need to set up
binfmt_misc. This is pretty easy in most distributions but is even easier now that you can just run a privileged Docker container to set it up for you.docker run --rm --privileged tonistiigi/binfmt:latest
or
docker run --rm --privileged docker/binfmt:latest
-
Create a new builder which gives access to the new multi-architecture features. This command creates a new builder instance. In this case, it supports both linux/arm64 and linux/amd64 platforms. The --name flag sets a name for the builder- "multi-platform-builder".
docker buildx create --use --platform=linux/arm64,linux/amd64 --name multi-platform-builder
-
This command inspects the builder created in the previous step and performs any necessary setup or configuration. The --bootstrap flag indicates that the builder should be initialized if it hasn't been already
docker buildx inspect --bootstrap
-
This command builds a Docker image using the builder created earlier.
docker buildx build --platform=linux/arm64,linux/amd64 --push --tag ghcr.io/otischung/pros_ai_image:latest -f ./Dockerfile .
Reference: https://stackoverflow.com/questions/70757791/build-linux-arm64-docker-image-on-linux-amd64-host
If you encounter that you can't build Dockerfile for arm64 due to libc-bin segmentation fault, try solve by the following instrucitons.
docker pull tonistiigi/binfmt:latest
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-*
docker run --privileged --rm tonistiigi/binfmt --install all)