Skip to content

Superset package included twice in v5.0.0 lean image #34120

Description

@schoel-bis

Bug description

The superset package is included twice in the lean image, once at /app/superset and once at /app/.venv/lib/python3.10/site-packages/superset. They are almost identical, except that the former contains a lot of __pycache__ entries that the latter does not have, and the latter does not contain any translation files at all:

docker run --rm --entrypoint=sh apache/superset:5.0.0 -c 'diff -r /app/.venv/lib/python3.10/site-packages/superset /app/superset'

I tried to run an image where the former directory is removed, and that seems to work fine:

FROM apache/superset:5.0.0

RUN rm -rf /app/superset

Note that the extra directory is ~75MB large, so I would say it is not exactly insignificant.

The cause appears to be in lines 247ff. of the Dockerfile, where the local superset module is instelled into the venv but then left where it is. Also note that in line 252 the python files inside /app/superset are all compiled, but that this happens after installation into the venv, so that should not have any practical effect on execution.

Screenshots/recordings

No response

Superset version

5.0.0

Python version

3.10

Node version

Not applicable

Browser

Not applicable

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    install:dockerInstallation - docker container

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions