mirror of
https://github.com/open-webui/open-webui
synced 2025-06-22 18:07:17 +00:00
Optimize the Docker image size
This commit is contained in:
parent
3b70841a7d
commit
f5e24bdf1a
@ -121,6 +121,10 @@ RUN if [ "$USE_OLLAMA" = "true" ]; then \
|
|||||||
curl -fsSL https://ollama.com/install.sh | sh && \
|
curl -fsSL https://ollama.com/install.sh | sh && \
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
|
# We make python smaller
|
||||||
|
find /usr/local/ -name "*.pyc" -delete \
|
||||||
|
find /usr/local/ -name "*.so" -exec strip {} + \
|
||||||
|
find /usr/local/ -type d \( -name test -o -name tests -o -name __pycache__ -o -name include \) -exec rm -rf '{}' + \
|
||||||
else \
|
else \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
# Install pandoc, netcat and gcc
|
# Install pandoc, netcat and gcc
|
||||||
@ -130,6 +134,10 @@ RUN if [ "$USE_OLLAMA" = "true" ]; then \
|
|||||||
apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
apt-get install -y --no-install-recommends ffmpeg libsm6 libxext6 && \
|
||||||
# cleanup
|
# cleanup
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
|
# We make python smaller
|
||||||
|
find /usr/local/ -name "*.pyc" -delete \
|
||||||
|
find /usr/local/ -name "*.so" -exec strip {} + \
|
||||||
|
find /usr/local/ -type d \( -name test -o -name tests -o -name __pycache__ -o -name include \) -exec rm -rf '{}' + \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install python dependencies
|
# install python dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user