-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MP-1215 Add images without conda/pip dependencies (#19)
This PR contains changes for the base images, which were needed for migrating vid-vision to uv: * Since we have upgraded pytorch, we don't have to install an older gcc anymore, so I could switch base Debian images from Bullseye to Bookworm (11 -> 12). * opensc had to be upgraded from 0.20.0 to 0.23.0 to work in newer Debian. * I don't replace old conda-based images, but add new ones (we may still need old images somewhere). * We always use a prebuilt pytorch now, even for cpu images. * genicam images have been removed. * For uv there are no separate pytorch images now: they are merged with moonbox images, since we don't do any python installations now. * All python dependencies have been moved to corresponding repositories; base images do not contain them anymore. Notes: * I didn't try to optimize installing of apt packages except some cases, when I had to do changes for adding uv anyway. * I could not completely get rid of conda: there were some packages, which otherwise have some complicated installation procedure - and I don't know, what exactly is needed from them (i.e., which parts should be installed, with which parameters should they be built etc.).
- Loading branch information
1 parent
22a15df
commit 99c1ded
Showing
13 changed files
with
245 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ARG baseimage='debian:bullseye-slim' | ||
ARG baseimage='debian:bookworm-slim' | ||
|
||
FROM $baseimage AS builder | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
ARG baseimage='moonvision/python-base:uv-latest' | ||
ARG ffmpeg_from_docker='moonvision/custom-builds:ffmpeg-4.2.1' | ||
|
||
FROM $ffmpeg_from_docker as ffmpeg_builder | ||
|
||
FROM ${baseimage} as installer | ||
|
||
ARG with_cuda='false' | ||
|
||
ARG DEBIAN_FRONTEND='noninteractive' | ||
# fixme: Why should gcc be installed both here and in python-base? And the same for checkinstall. | ||
RUN apt-get update --yes --no-install-recommends \ | ||
&& apt-get install --yes gcc g++ checkinstall cmake --no-install-recommends | ||
|
||
COPY --from=ffmpeg_builder /packages /ffmpeg-packages | ||
COPY . /bd_build | ||
|
||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
RUN with_cuda=$with_cuda bash /bd_build/install_deps_uv.sh | ||
|
||
# squash /packages | ||
FROM ${baseimage} | ||
COPY --from=installer / / | ||
|
||
RUN echo "ffmpeg codecs: " && ffmpeg -codecs | ||
|
||
# convince nvidia runc shim to inject driver, c.f.: | ||
# https://canvatechblog.com/supporting-gpu-accelerated-machine-learning-with-kubernetes-and-nix-7c1da8e42f61 | ||
ARG with_cuda | ||
ENV NVIDIA_VISIBLE_DEVICES=${with_cuda:+all} | ||
ENV NVIDIA_DRIVER_CAPABILITIES=${with_cuda:+compute,utility} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.