Spaces:
Sleeping
Sleeping
File size: 908 Bytes
f58c325 36a2d5a 811f85a f58c325 3c0ec77 811f85a 5a0eea6 3c0ec77 811f85a 71bff0f 36a2d5a f58c325 1739fdc 5a0eea6 eae8aba 1739fdc f58c325 811f85a 990e712 |
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 |
# Use a slim Python image as the base image
FROM python:3.10-slim
# Set the working directory
WORKDIR /app
# Copy application files into the container
COPY . /app
# Create and set permissions for the uploads, cache, audio_cache, and transcript_cache directories
RUN mkdir -p /app/uploads /app/.cache/whisper /app/audio_cache /app/transcript_cache && chmod -R 777 /app/uploads /app/.cache /app/audio_cache /app/transcript_cache
# Set environment variable for the cache directory
ENV XDG_CACHE_HOME=/app/.cache
# Install system dependencies and Python packages
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& pip install --no-cache-dir -r requirements.txt
# Expose the application port
EXPOSE 7860
# Define the entrypoint for the container with Gunicorn
CMD ["gunicorn", "-b", "0.0.0.0:7860", "-w", "4", "-k", "gevent", "--timeout", "300", "app:app"]
|