mirror of
https://github.com/casjaysdevdocker/ollama
synced 2026-06-24 14:01:06 -04:00
🗃️ Update codebase 🗃️
Dockerfile rootfs/root/docker/setup/05-custom.sh rootfs/root/docker/setup/07-cleanup.sh
This commit is contained in:
@@ -83,8 +83,14 @@ python3 --version
|
||||
echo "Installing Open WebUI..."
|
||||
|
||||
# Install Open WebUI using system Python (requires --break-system-packages in Docker)
|
||||
# Split installation to avoid buildx timeout on large pip operations
|
||||
python3 -m pip install --break-system-packages --upgrade pip
|
||||
python3 -m pip install --break-system-packages open-webui
|
||||
|
||||
# Install with optimized flags to reduce build time and memory
|
||||
# --no-cache-dir: Prevents caching to save space and avoid timeout issues
|
||||
# --disable-pip-version-check: Faster installation
|
||||
echo "Installing Open WebUI dependencies (this may take several minutes)..."
|
||||
python3 -m pip install --break-system-packages --no-cache-dir --disable-pip-version-check open-webui
|
||||
|
||||
# Verify Open WebUI installation
|
||||
if python3 -m open_webui --help >/dev/null 2>&1; then
|
||||
@@ -95,6 +101,9 @@ else
|
||||
echo "⚠ Warning: Open WebUI may not be in PATH, but should be installed"
|
||||
fi
|
||||
|
||||
# Clean pip cache to reduce image size
|
||||
python3 -m pip cache purge 2>/dev/null || true
|
||||
|
||||
echo "✓ Ollama and Open WebUI installation complete"
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
@@ -36,6 +36,14 @@ if [ -d "$HOME/.cache" ]; then rm -Rf "$HOME/.cache"; fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Main script
|
||||
|
||||
# Clean up pip cache and temporary Python files to reduce image size
|
||||
if command -v python3 >/dev/null 2>&1; then
|
||||
python3 -m pip cache purge 2>/dev/null || true
|
||||
find /usr -type d -name '__pycache__' -exec rm -rf {} + 2>/dev/null || true
|
||||
find /usr -type f -name '*.pyc' -delete 2>/dev/null || true
|
||||
find /usr -type f -name '*.pyo' -delete 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Set the exit code
|
||||
#exitCode=$?
|
||||
|
||||
Reference in New Issue
Block a user