File size: 729 Bytes
7379e3f 7ded65d 7379e3f 662c180 7ded65d 7379e3f 662c180 |
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 |
FROM python:3.10-slim
# Install system dependencies including ffmpeg
RUN apt-get update && apt-get install -y \
libsndfile1 \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Create cache and logs directories
RUN mkdir -p /app/cache /app/logs && \
chown -R 1000:1000 /app/cache /app/logs && \
chmod -R 775 /app/cache /app/logs
# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app.py .
# Set environment variable for Hugging Face cache
ENV HF_HOME=/app/cache
# Expose port
EXPOSE 8000
# Run the FastAPI app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |