AliceVision
AliceVision copied to clipboard
Add new Dockerfile and configure GH action to build & push
trafficstars
Description
This PR introduces the following:
- A brand new Dockerfile (
docker/Dockerfile_ubuntu_new) to build alicevision from scratch on the latest Ubuntu and CUDA. - A new GitHub action which automatically builds a docker image and pushes it to ghcr.io on every push to the specified branches. This requires a secret to be configured by the repo owner:
GHCR_PUSH_TOKENwhich is a PAT with thepackages:writeaction. This can be easily changed to push to Docker Hub if desired (or both). This has been tested thoroughly on my fork (check here). Moreover, tests can be run from the build arguments by setting the env var:RUN_TESTStoONwhich is done in the latest run. - Attempts to fix the old Dockerfiles, but I ended up disabling them in the GH action. I recommend removing them altogether.
- A new CMake build variable
AV_BUILD_VPXwhich defaults toONand controls the build oflibvpxin case someone wants to install it externally and skip its build (I did this in the new Dockerfile). - Fixed a bug in
docker/check-cpu.shwhich was causing builds to always use 1 CPU regardless of number of available CPUs on the build machine. I am not using it anyway in the new Dockerfile, but it was hard to miss! - Removed dependency on the
docker/build*scripts which is not the recommended way of invoking docker builds as they should be self-contained and independent of the host OS.
Features list
- New Docker build
- New GitHub action
- Some bug fixes
Implementation remarks
Hi @hammady , Thanks for the nice contribution! That's really helpful. I have already cherry-picked 2 commits into https://github.com/alicevision/AliceVision/pull/1325 and it's merged into develop. It's better if you directly modify the Dockerfil_ubuntu, we don't need to maintain multiple ubuntu versions. Can you contact me at [email protected]? I like the idea of using the ci to push on dockerhub, but maybe only for AliceVision and not for the deps. I would like to discuss that with you and see in detail how we can get your PR merged. Thanks!