refactor: Dockerfile - MKL oneAPI support - Use DEB822 .sources
#239
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses feedback from another PR I gave:
.sources
format instead of deprecated.list
format.-qq
(implies-y
) forapt-get
commands, and ensure consistent cleanup viarm
is used in relatedRUN
steps.NOTE: I am not familiar with oneAPI or supporting it.
As this feature is not part of the official
mistral.rs
Dockerfile (that it was claimed to have been imported from), there is alibomp-dev
runtime dependency (since the originalDockerfile
contribution atmistral.rs
), but not one associated to oneAPI as has been added into thebuilder
stage (presumably just for headers and symlink, at which point I wonder if the original runtime stage package had ever been required previously 🤷♂️).Since the package has existed in the runtime stage from the beginning I've avoided shifting it into the MKL associated
RUN
or adding commentary, as I do not know if that is used by anything else?Regarding size of this dependency
Personally I am against monolithic images and mixing concerns from a maintenance and user perspectives. Mixing the MKL/oneAPI support with CUDA seems unnecessary and is definitely wasteful to users interested in building the image that aren't using either of these heavy dependencies.
Installing the
intel-oneapi-hpc-toolkit
package appears to add approx 12GB of weight, which in this case will be double due to it being additive to both build and runtime stages. It could possibly be optimized there but I don't have the hardware available to investigate.CUDA is of similar weight for it's build image, but the runtime image is notably slimmer by comparison.
I presently lack a system with the disk space to build the full
Dockerfile
, but I assume it's rather large. The testDockerfile
I used spent the bulk of it's build time just installing the dep (500 secs, about 80% of build time), and that is with no builder stage involved.I'd encourage separate image variants for such going forward.
The existing support was snuck in despite the contributor having already been advised for their related contribution at
mistral.rs
to addmkl
feature support as a separate image variant.