-
Notifications
You must be signed in to change notification settings - Fork 441
Refactor CUDA Container file #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
33599f0
to
eea9eab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice cleanup! One thing I am unsure of is the new flow in which you podman run
for each command you want to run. I would be ok with this as long as there was another build target that installed ilab
but the entrypoint was just bin/bash
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the couple of comments, this works well
@tiran FYI, I also needed this package |
@stefwalter In the final image or on the host system? |
In the image. Without
With the library installed then |
f68ed6a
to
6498f78
Compare
I have simplified the CUDA container file even more. It's no longer using rootless. While rootless is more secure, it's harder to use, too. Let's keep it simple for now and improve it later. You can fetch a ready-to-use image from |
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Signed-off-by: Christian Heimes <cheimes@redhat.com>
This pull request has merge conflicts that must be resolved before it can be |
Add some flags taken from instructlab/instructlab#994
@tiran does this still only have the capability to only run 1 cmd per container run? if so, I would really vote to add back the old workflow of exec'ing into a running ctr with ilab installed. I may have lost context here so feel free to correct me :) |
This pull request has merge conflicts that must be resolved before it can be |
@tiran any update on this? |
Fabien is taking care of CUDA container. Closing this stale PR. |
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves instructlab#899 Replaces instructlab#992 Replaces instructlab#994 Signed-off-by: Fabien Dupont <fdupont@redhat.com>
This change modifies the Containerfile for NVIDIA CUDA to: - Use CentOS Stream 9 as the default base image. UBI9 also works - Install the NVIDIA packages from NVIDIA repository for exact CUDA version - Add NVIDIA scripts from `nvcr.io/nvidia/cuda` image for copyrights... - Install the Python packages in a Python 3.11 virtualenv - Install instructlab package from PyPI - Allow specifying the instructlab version at build time - Make the final container rootless Resolves #899 Replaces #932 Replaces #994 Approved-by: nathan-weinberg Approved-by: markstur
Changes
Which issue is resolved by this Pull Request:
Resolves #899
Resolves #932
Description of your changes:
Modify the Containerfile for NVIDIA CUDA to:
ubi9/python-311
containerflash-attn
andbitesandbytes
Propose a shell alias that should simplify the user experience when using the container image, avoiding using long podman run commands.
Modify the containerization documentation to explain this and provide steps for the user.
Update the
cuda
target in the Makefile to reflect the changes above.The changeset is co-authored by Fabien Dupont and is built on top of previous work by Charlie Doern and Fabien Dupont.