-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 826 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 826 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use a lightweight Python base
FROM python:3.11-slim
# Prevent Python from writing pyc files and force stdout/stderr flushing
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
# Set work directory
WORKDIR /app
# Install system deps (for ffmpeg if audio processing needs it)
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Copy project files
COPY . /app
# Install Python deps
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -e . \
&& pip install --no-cache-dir uvicorn
EXPOSE 7860 8000
# Default to Gradio UI, switch to API with APP_MODE=api
CMD if [ "$APP_MODE" = "api" ]; then \
uvicorn local_notebooklm.server:app --host 0.0.0.0 --port 8000 --reload; \
else \
python -m local_notebooklm.web_ui --port 7860; \
fi