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

Optimise images #2066

Merged
merged 13 commits into from
Sep 27, 2023
Merged

Optimise images #2066

merged 13 commits into from
Sep 27, 2023

Conversation

angrybayblade
Copy link
Contributor

Proposed changes

This PR

  • Refactors autonomy and agent images
    • Include install and build scripts in the base image
    • Remove unwanted layers
    • Remove unwanted data files

Fixes

If it fixes a bug or resolves a feature request, be sure to link to that issue.

Types of changes

What types of changes does your code introduce? (A breaking change is a fix or feature that would cause existing functionality and APIs to not work as expected.)
Put an x in the box that applies

  • Non-breaking fix (non-breaking change which fixes an issue)
  • Breaking fix (breaking change which fixes an issue)
  • Non-breaking feature (non-breaking change which adds functionality)
  • Breaking feature (breaking change which adds functionality)
  • Refactor (non-breaking change which changes implementation)
  • Messy (mixture of the above - requires explanation!)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the main branch (left side). Also you should start your branch off our main.
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have locally run services that could be impacted and they do not present failures derived from my changes
  • Public-facing documentation has been updated with the changes affected by this PR. Even if the provided contents are not in their final form, all significant information must be included.
  • Any backwards-incompatible/breaking change has been clearly documented in the upgrading document.

- Include install and build scripts in the base image
- Remove unwanted layers
- Remove unwanted data files
@angrybayblade angrybayblade changed the title Feat/optimise images Optimise images Sep 27, 2023
Comment on lines -9 to -10
COPY start.sh /home/ubuntu
COPY install.sh /home/ubuntu
Copy link
Contributor Author

@angrybayblade angrybayblade Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will be included in the base image


WORKDIR /home/ubuntu
ENV PATH=$PATH:/home/ubuntu/.local/bin
COPY scripts /root/scripts
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Install and runner scripts

Comment on lines -9 to -13
RUN sudo apt-get update --fix-missing
RUN sudo apt-get autoremove
RUN sudo apt-get autoclean
RUN sudo apt-get install python3.10 python3.10-dev git cmake autoconf automake build-essential libffi-dev libtool pkg-config -y
RUN cd /usr/bin && sudo rm python3 && sudo ln -s python3.10 python3 && sudo ln -s python3.10 python
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to install the python interpreters and dev libraries, they are included in the base image

RUN sudo apt-get install net-tools -y
RUN python -m pip install --upgrade pip

COPY openssl.cnf /etc/ssl
Copy link
Contributor Author

@angrybayblade angrybayblade Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Included in the base image

Comment on lines -1 to -4
open-aea[all]>=1.40.0,<2.0.0
open-aea-cli-ipfs>=1.40.0,<2.0.0
protobuf>=4.21.6,<5.0.0
requests==2.27.1
Copy link
Contributor Author

@angrybayblade angrybayblade Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already included in the base image

Copy link
Collaborator

@solarw solarw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

❗ No coverage uploaded for pull request base (bump/oaea-1-40-0@01ef7ee). Click here to learn what that means.

Additional details and impacted files
@@                 Coverage Diff                 @@
##             bump/oaea-1-40-0    #2066   +/-   ##
===================================================
  Coverage                    ?   94.23%           
===================================================
  Files                       ?      263           
  Lines                       ?    15956           
  Branches                    ?        0           
===================================================
  Hits                        ?    15036           
  Misses                      ?      920           
  Partials                    ?        0           
Flag Coverage Δ
unittests 94.23% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@angrybayblade angrybayblade merged commit 316e046 into bump/oaea-1-40-0 Sep 27, 2023
@DavidMinarsch DavidMinarsch deleted the feat/optimise-images branch November 25, 2023 23:21
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.

3 participants