Skip to content
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

chore(docker): adjust Dockerfile layers to improve build cache design #2102

Merged
merged 6 commits into from
Mar 16, 2024
Merged

chore(docker): adjust Dockerfile layers to improve build cache design #2102

merged 6 commits into from
Mar 16, 2024

Conversation

jim60105
Copy link
Contributor

I modified the dockerfile to enhance the reusability of layers, enabling users to use more existing layers during application updates, resulting in savings in disk space and build time.
In fact, there will only be some minor differences, since now this project does not bring in the version and release number when building docker images (which should be done in CI).

And I organized the dataset directory structure and bind it to the default path to ensure that the default directory logic implemented in this project can be applied in the docker environment.

Notice that I bind the regularization images directory with the name regularization and the configuration files directory with the name config, which does not align with the project's default settings.
At present, both the regularization directory and the training images directory share the same default directory data. In my opinion, it would be better to distinguish between them.
As for the config directory, it currently default to None. I suggest assign and init it just like other directories does.

So it can keep git working tree clean when user has dataset files.

Signed-off-by: 陳鈞 <[email protected]>
- Remove Docker LABEL related metadata and ARG for UID, VERSION, RELEASE from the beginning of the Dockerfile.
- Add NVIDIA environment settings to make visible devices and driver capabilities available.
- Add ARG UID back and modify user creation command accordingly.
- Make use of hard links (with `--link`) for license and code copy commands to optimize use of space.
- Reposition WORKDIR and ARG declarations for VERSION and RELEASE towards the end of the Dockerfile.
- Attach metadata labels like name, vendor, url, version, release, display name, summary, and description at the end of the Dockerfile, instead of the beginning.

Signed-off-by: 陳鈞 <[email protected]>
Clear special settings that were used in the old image.

Signed-off-by: 陳鈞 <[email protected]>
@jim60105
Copy link
Contributor Author

#2103 I open an issue about regularization and config folder

@bmaltais bmaltais merged commit 9df9160 into bmaltais:dev Mar 16, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants