projects
/
music-assistant-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f287033
)
Pre-compile Python bytecode in Dockerimage for faster startup
author
Marcel van der Veldt
<m.vanderveldt@outlook.com>
Mon, 23 Feb 2026 00:36:13 +0000
(
01:36
+0100)
committer
Marcel van der Veldt
<m.vanderveldt@outlook.com>
Mon, 23 Feb 2026 00:36:13 +0000
(
01:36
+0100)
Dockerfile
patch
|
blob
|
history
diff --git
a/Dockerfile
b/Dockerfile
index 913c50838589cb43cba242e6b0ca345f4ed5cb70..f215d796c9a0e3b28a4b5d482f5187a42da66619 100644
(file)
--- a/
Dockerfile
+++ b/
Dockerfile
@@
-38,6
+38,9
@@
RUN uv pip install \
--no-cache \
"music-assistant@dist/music_assistant-${MASS_VERSION}-py3-none-any.whl"
+# Pre-compile Python bytecode for faster startup
+RUN $VIRTUAL_ENV/bin/python -m compileall -q $VIRTUAL_ENV/lib/python*/site-packages/music_assistant
+
# we need to set (very permissive) permissions to the workdir
# and /tmp to allow running the container as non-root
# IMPORTANT: chmod here, NOT on the final image, to avoid creating extra layers and increase size!