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

Internal: Remove base environment from Docker Conda images #2249

Closed
5 of 22 tasks
georgemccabe opened this issue Jul 14, 2023 · 1 comment
Closed
5 of 22 tasks

Internal: Remove base environment from Docker Conda images #2249

georgemccabe opened this issue Jul 14, 2023 · 1 comment
Assignees
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle component: CI/CD Continuous integration and deployment issues component: docker component: testing Software testing issue priority: medium Medium Priority requestor: METplus Team METplus Development Team type: task An actionable item of work
Milestone

Comments

@georgemccabe
Copy link
Collaborator

Scripts in internal/scripts/docker_env are used to create Docker images that contain Conda environments used for use case tests that require additional python packages. Many of the conda environments are created by copying (cloning) an existing environment (like metplus_base or py_embed_base) and adding packages. The original base environment still exists in the Docker image. Some of these conda environments, like metplotpy, take up a lot of space and cause the Docker image to be very large even though the base image is not used.

Describe the Task

Add logic to the Dockerfiles in internal/scripts/docker_env to remove the conda environment used to create a new environment after the new one is created. Consider creating a GitHub Action workflow that can be triggered through the web UI to build and push these images so they can be run by other developers.

Time Estimate

~1 day

Sub-Issues

Consider breaking the task down into sub-issues.

  • Add a checkbox for each sub-issue here.

Relevant Deadlines

None

Funding Source

Define the source of funding and account keys here or state NONE.

Define the Metadata

Assignee

  • Select engineer(s) or no engineer required
  • Select scientist(s) or no scientist required

Labels

  • Select component(s)
  • Select priority
  • Select requestor(s)

Projects and Milestone

  • Select Repository and/or Organization level Project(s) or add alert: NEED CYCLE ASSIGNMENT label
  • Select Milestone as the next official version or Future Versions

Define Related Issue(s)

Consider the impact to the other METplus components.

Task Checklist

See the METplus Workflow for details.

  • Complete the issue definition above, including the Time Estimate and Funding Source.
  • Fork this repository or create a branch of develop.
    Branch name: feature_<Issue Number>_<Description>
  • Complete the development and test your changes.
  • Add/update log messages for easier debugging.
  • Add/update unit tests.
  • Add/update documentation.
  • Add any new Python packages to the METplus Components Python Requirements table.
  • Push local changes to GitHub.
  • Submit a pull request to merge into develop.
    Pull request: feature <Issue Number> <Description>
  • Define the pull request metadata, as permissions allow.
    Select: Reviewer(s) and Development issues
    Select: Repository level development cycle Project for the next official release
    Select: Milestone as the next official version
  • Iterate until the reviewer(s) accept and merge your changes.
  • Delete your fork or branch.
  • Close this issue.
@georgemccabe georgemccabe added component: testing Software testing issue priority: medium Medium Priority type: task An actionable item of work alert: NEED ACCOUNT KEY Need to assign an account key to this issue component: CI/CD Continuous integration and deployment issues alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle requestor: METplus Team METplus Development Team component: docker labels Jul 14, 2023
@georgemccabe georgemccabe added this to the METplus-5.1.0 milestone Jul 14, 2023
@georgemccabe georgemccabe self-assigned this Jul 14, 2023
georgemccabe added a commit that referenced this issue Jul 14, 2023
…that was used to create a new environment to free up space
georgemccabe added a commit that referenced this issue Jul 14, 2023
…that was used to create a new environment to free up space
@georgemccabe
Copy link
Collaborator Author

The logic to remove the unused Conda environments was added in c986e69. I rebuilt a few images to test and discovered that the size of the images did not decrease as I expected, but actually increased very slightly (likely due to the update/upgrade commands for the OS and conda that have grown since the last time they were built). This is looking at compressed image size on DockerHub, so it is possible that these changes will be useful to reduce the size of the final Docker container that is used to run the use case tests and may still alleviate disk space issues.

I am still rebuilding the Docker images and pushing them to DockerHub. This issue can be closed when that is completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alert: NEED ACCOUNT KEY Need to assign an account key to this issue alert: NEED CYCLE ASSIGNMENT Need to assign to a release development cycle component: CI/CD Continuous integration and deployment issues component: docker component: testing Software testing issue priority: medium Medium Priority requestor: METplus Team METplus Development Team type: task An actionable item of work
Projects
No open projects
Development

No branches or pull requests

1 participant