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
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] 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.
Comment From: rusackas
I usually CC @mistercrunch on these docker image issues, so here I go again ;)
Comment From: mistercrunch
Good catch, we should definitely investigate and fix. Would love to get more people deep in there as it's hard to find cycles [and energy] to giving this the attention it deserves.