File size: 703 Bytes
62dd132
 
 
 
 
 
 
eed40e3
 
 
 
 
 
62dd132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.9-slim

WORKDIR /app

# Install ffmpeg for audio processing
RUN apt-get update && apt-get install -y ffmpeg && apt-get clean

# Create a cache directory with proper permissions
RUN mkdir -p /app/.cache && chmod 777 /app/.cache
ENV TRANSFORMERS_CACHE=/app/.cache
ENV HF_HOME=/app/.cache
ENV SENTENCE_TRANSFORMERS_HOME=/app/.cache

# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application
COPY . .

# Create necessary directories if they don't exist
RUN mkdir -p /app/templates /app/static

# Expose the port the app runs on
EXPOSE 7860

# Start the Flask app
CMD ["python", "-m", "flask", "run", "--host=0.0.0.0", "--port=7860"]