-
Notifications
You must be signed in to change notification settings - Fork 116
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
Jinja docker template #426
Conversation
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.
PR Summary
This PR introduces a Jinja2-based templating system for generating Dockerfiles, improving flexibility and maintainability across different environments (CUDA, CPU, AMD).
- Added
Dockerfile.jinja2
template anddocker.template.yaml
configuration file for customizable Docker builds - Created
Dockerfile.amd_auto
andDockerfile.cpu_auto
for AMD and CPU-specific builds - Updated
pyproject.toml
with new dependencies and Poetry sources for different PyTorch configurations - Modified
Makefile
to include a new 'template_docker' target for generating Dockerfiles - Changed import condition in
infinity_emb/transformer/audio/torch.py
to require both torch and transformers
9 file(s) reviewed, 24 comment(s)
Edit PR Review Bot Settings | Greptile
# do not ask any interactive question | ||
POETRY_NO_INTERACTION=1 \ | ||
EXTRAS="all" \ | ||
PYTHON="python3.11" |
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.
logic: PYTHON variable set to python3.11, but base image uses python3.10. This mismatch may cause issues.
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.
Fair, but amd is currently not working
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #426 +/- ##
=======================================
Coverage 79.15% 79.15%
=======================================
Files 41 41
Lines 3229 3229
=======================================
Hits 2556 2556
Misses 673 673 ☔ View full report in Codecov by Sentry. |
This pull request includes significant updates to the Dockerfile setup and workflow configurations to enhance the build process for different platforms. The changes focus on adding support for NVIDIA, CPU, and AMD builds, improving the Dockerfile generation process, and refining the workflow for Docker container releases.
Dockerfile and Workflow Enhancements:
Workflow Configuration Updates:
.github/workflows/release.yaml
: Added separate jobs for NVIDIA and CPU Docker container pushes, including support for multiple platforms (linux/amd64
,linux/arm64
)..github/workflows/release_docker_container.yaml
: Introducedappendix_tag
andplatforms
inputs to allow dynamic tagging and platform specification during Docker builds. [1] [2]Dockerfile Generation and Template Improvements:
libs/infinity_emb/Dockerfile.jinja2
: Created a Jinja2 template for generating Dockerfiles for different platforms (NVIDIA, CPU, AMD), ensuring consistency and reducing manual edits.libs/infinity_emb/docker.template.yaml
: Added configuration for generating Dockerfiles using the Jinja2 template, specifying base images and installation commands for each platform.libs/infinity_emb/Dockerfile
,libs/infinity_emb/Dockerfile.amd_auto
,libs/infinity_emb/Dockerfile.cpu_auto
: Updated Dockerfiles to include autogenerated warnings and platform-specific configurations. [1] [2] [3]Makefile Enhancements:
libs/infinity_emb/Makefile
: Added atemplate_docker
target to automate the generation of Dockerfiles using the Jinja2 template and the configuration file. [1] [2]These changes streamline the Docker build process, making it easier to manage and deploy containers across different platforms.