File size: 657 Bytes
7379e3f
 
 
e859b2f
7379e3f
 
 
 
7ded65d
e859b2f
7ded65d
7379e3f
 
 
 
 
e859b2f
7379e3f
662c180
 
7ded65d
e859b2f
 
7379e3f
e859b2f
 
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
FROM python:3.10-slim

# Install system dependencies including ffmpeg
RUN apt-get update && apt-get install -y ffmpeg libsndfile1 && apt-get clean

# Set working directory
WORKDIR /app

# Create cache and logs directories
RUN mkdir -p /app/cache /app/logs && chmod -R 777 /app/cache /app/logs

# Copy requirements and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application code
COPY . .

# Set environment variable for Hugging Face cache
ENV HF_HOME=/app/cache

# Expose Hugging Face Spaces port
EXPOSE 7860

# Run the FastAPI app with uvicorn
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]