File size: 759 Bytes
3ddf776
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10.14

# Install dependencies
RUN apt-get update && apt-get install -y libsndfile1 espeak-ng

# Set the working directory
WORKDIR /app

# Create cache directory with write permissions
RUN mkdir -p /app/.cache && chmod 777 /app/.cache


# Устанавливаем зависимости
COPY requirements.txt /app/requirements.txt
RUN apt-get update && apt-get install -y git ffmpeg && \
    pip install --no-cache-dir -r /app/requirements.txt

# Copy the application code
COPY . .

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

# Create cache directory and set permissions
RUN mkdir -p /app/cache && chmod -R 777 /app/cache


# Expose the port
EXPOSE 7860

# Run the application
CMD ["python", "app.py"]