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 user image #669

Merged
merged 3 commits into from
Sep 25, 2023
Merged

Optimise user image #669

merged 3 commits into from
Sep 25, 2023

Conversation

angrybayblade
Copy link

Proposed changes

  • Use python 3.11 for deployments
  • Remove unwanted dependencies

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 to agents-aea?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING doc
  • I am making a pull request against the develop branch (left side). Also you should start your branch off our develop.
  • Lint and unit tests pass locally with my changes and CI passes too
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that code coverage does not decrease.
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

- Use python 3.11 for deployments
- Remove unwanted dependencies
FROM ubuntu:22.04
FROM python:3.11-slim
Copy link
Author

Choose a reason for hiding this comment

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

Use the minimal python image as base

Comment on lines -18 to -21
RUN wget https://dl.google.com/go/go1.13.8.linux-amd64.tar.gz && \
tar -xzvf go1.13.8.linux-amd64.tar.gz -C /usr/local && \
export PATH=$PATH:/usr/local/go/bin && echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc && \
mkdir $HOME/go
Copy link
Author

Choose a reason for hiding this comment

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

Not required for agent runtime

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (43b725f) 92.31% compared to head (6b02944) 92.31%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #669   +/-   ##
=======================================
  Coverage   92.31%   92.31%           
=======================================
  Files         371      371           
  Lines       29647    29647           
=======================================
  Hits        27370    27370           
  Misses       2277     2277           
Flag Coverage Δ
unittests 92.31% <ø> (ø)

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.

solarw
solarw previously approved these changes Sep 25, 2023
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8

RUN apt update
Copy link
Collaborator

Choose a reason for hiding this comment

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

@angrybayblade better to join in one command with &&, so there will be no intermediate layers cosuming disk space.
so install and clean at the same time.

@@ -1,36 +1,19 @@
FROM ubuntu:22.04
FROM python:3.11-slim
Copy link
Collaborator

Choose a reason for hiding this comment

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

cool change!
we definitely need to pay more attention to the images quiality

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

@angrybayblade angrybayblade merged commit 391552e into main Sep 25, 2023
32 of 36 checks passed
@DavidMinarsch DavidMinarsch deleted the feat/optimise-images branch October 12, 2023 23:55
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