Create Dockerfile
Browse files1234567891011121314151617181920212223242526272829303132333435FROM python:3.9-slim
WORKDIR /app
# Install system dependenciesRUN apt-get update && \ apt-get install -y --no-install-recommends \ gcc \ python3-dev \ ffmpeg \ libimage-exiftool-perl \ && rm -rf /var/lib/apt/lists/*
# Copy requirements first for cachingCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt
# Application codeCOPY app.py text2generation.py video_processor.py ./
# Environment variablesENV TRANSFORMERS_CACHE=/tmp/cache \ HF_HOME=/tmp/cache \ PYTHONUNBUFFERED=1
# Create cache directoryRUN mkdir -p /tmp/cache && \ chmod 777 /tmp/cache
EXPOSE 7860
HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 \ CMD curl -f http://localhost:7860/health || exit 1
CMD ["python", "app.py"]DockerfileAdded+35