Enhance README.md with Docker installation instructions and update Ollama API endpoint to be configurable via environment variable.

This commit is contained in:
Your Name
2025-07-17 00:05:23 -04:00
parent c2ee2394d2
commit dcf13c1423
7 changed files with 568 additions and 2 deletions

44
Dockerfile Normal file
View File

@ -0,0 +1,44 @@
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
ffmpeg \
git \
wget \
curl \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first for better Docker layer caching
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Install PyTorch with CUDA support (adjust based on your needs)
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# Copy application code
COPY . .
# Create directories for mounted volumes
RUN mkdir -p /app/data/videos /app/data/outputs /app/data/cache
# Set environment variables
ENV STREAMLIT_SERVER_PORT=8501
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
# Expose Streamlit port
EXPOSE 8501
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8501/_stcore/health || exit 1
# Start the application
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]