Perilon's picture
Bug fixes
2daffd5
raw
history blame
906 Bytes
FROM python:3.9-slim
WORKDIR /app
# Copy requirements first for better caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install ffmpeg
RUN apt-get update && apt-get install -y ffmpeg && apt-get clean
# Copy application code
COPY . .
# Set environment variables for HF Spaces
ENV PYTHONUNBUFFERED=1
ENV PORT=7860
ENV SPACE_ID="true"
ENV BYPASS_AUTH="true"
ENV SECRET_KEY="f7290fc27f11dbf14be6cd348638ad62"
ENV DEBUG="True"
ENV S3_BUCKET="sorenson-ai-sb-scratch"
ENV S3_VIDEO_PREFIX="awilkinson/kylie_dataset_videos_for_alignment_webapp/"
ENV USE_S3_FOR_VIDEOS="true"
# Create necessary directories
RUN mkdir -p data/videos data/annotations data/temp data/word_timestamps data/alignments data/transcripts
# Make port available
EXPOSE 7860
# Run with gunicorn for better stability
CMD exec gunicorn --bind :7860 --workers 1 --threads 2 --timeout 600 "flask_app:app"