Skip to content

Add CrossGen2 Dockerfiles for the various options we want to perf test #1818

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

Conversation

MichaelSimons
Copy link
Member

@MichaelSimons MichaelSimons commented Apr 7, 2020

This PR is intended to produce the images we would like to perf test as discussed in #1791.

Related to #1820

&& rm aspnetcore.tar.gz \
\
# Crossgen .NET Core
&& /crossgen2/crossgen2 \
Copy link
Member Author

Choose a reason for hiding this comment

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

@davidwrighton - can you help me out with the correct crossgen2 build args here?

This is for the following scenario:

I see a fourth option which is the runtime uses composite images and aspnet does as well, but they do not use a unified composite image, but rather one built locally to the particular image.

Copy link
Member

Choose a reason for hiding this comment

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

You need a -r argument to reference the runtime level bits. So, add an argument like -r /dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll to the command line.

Copy link
Member

Choose a reason for hiding this comment

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

btw, does the change to publish crossgen2 binaries work? I wasn't able to test the end to end scenario without checking in.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @davidwrighton for the guidance on which args to use. I did run into an issue with the arg which I am not sure if it is a known issue or something wrong with my usage. I had issues when -r was specified just before the input-files. The following Dockerfile snippets illustrate what I mean.

Broken - error regarding no input-files specified

    # Crossgen .NET Core
    && /crossgen2/crossgen2 \
        --composite --inputbubble -O --Os \
        -o /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/Microsoft.AspNetCore.App.SharedFramework.dll \
        -r /usr/share/dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll \
        /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/*.dll

Working

    # Crossgen .NET Core
    && /crossgen2/crossgen2 \
        --composite --inputbubble -O --Os \
        -r /usr/share/dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll \
        -o /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/Microsoft.AspNetCore.App.SharedFramework.dll \
        /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/*.dll

Copy link
Member Author

Choose a reason for hiding this comment

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

btw, does the change to publish crossgen2 binaries work

I hooked-up the docker unit tests which run an e2e app scenario. The tests are passing which is encouraging.

@MichaelSimons
Copy link
Member Author

I am still working on defining the various SDK images.

ENV DOTNET_VERSION 5.0.0-preview.2.20160.6

# Install crossgen2
RUN wget -O crossgen2.tar.gz https://dotnetbinaries.blob.core.windows.net/dockerassets/microsoft.netcore.app.crossgen2.linux-musl-x64.$DOTNET_VERSION.tar.gz \
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a temporary solution I built and uploaded until we get on a build that includes the official crossgen2 artifacts - dotnet/runtime#34623

@MichaelSimons MichaelSimons changed the title [WIP] Add CrossGen2 Dockerfiles for the various options we want to perf test Add CrossGen2 Dockerfiles for the various options we want to perf test Apr 8, 2020
@MichaelSimons
Copy link
Member Author

I'm going to merge. Feel free to provide feedback at any time and we can refactor. This is still evolving.

@MichaelSimons MichaelSimons merged commit 942d7ee into dotnet:feature/r2r-version-bubbles Apr 8, 2020
@MichaelSimons MichaelSimons deleted the multiple-options branch April 8, 2020 22:00
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