Spaces:
Sleeping
Sleeping
File size: 818 Bytes
55b22fc a2f0c28 55b22fc a2f0c28 55b22fc 95d4ef5 99cc046 55b22fc 95d4ef5 55b22fc a2f0c28 55b22fc a2f0c28 55b22fc a2f0c28 | 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 28 29 30 31 32 33 34 | FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ffmpeg \
libsm6 \
libxext6 \
&& rm -rf /var/lib/apt/lists/*
# Set up working directory
WORKDIR /app
# Create cache directories with proper permissions
RUN mkdir -p \
/tmp/transformers_cache \
/tmp/huggingface \
/tmp/whisper_cache && \
chmod -R 777 /tmp
# Set environment variables
ENV TRANSFORMERS_CACHE=/tmp/transformers_cache
ENV HF_HOME=/tmp/huggingface
ENV WHISPER_CACHE_DIR=/tmp/whisper_cache
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Run the application
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |