autoshorts / Dockerfile
h4sh99's picture
Update Dockerfile
42aaf31 verified
raw
history blame contribute delete
803 Bytes
# Use a slim Python base
FROM python:3.11-slim
# Install system dependencies:
# - ffmpeg: for video processing
# - fonts-dejavu-core: for subtitles
# - libgomp1: required by ctranslate2 / faster-whisper
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg fonts-dejavu-core libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Set work directory
WORKDIR /app
# Copy dependencies list
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy your app code
COPY app.py .
# Environment variables (optional)
ENV STREAMLIT_SERVER_MAXUPLOADSIZE=1024
# Expose Space’s port
EXPOSE 7860
# Start Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--browser.gatherUsageStats=false"]