File size: 844 Bytes
3117187
 
f4fd0b5
 
 
6778b36
f4fd0b5
6778b36
3117187
f4fd0b5
6778b36
 
 
 
 
 
 
aa8694c
3117187
 
f4fd0b5
3117187
 
6778b36
 
f4fd0b5
6778b36
 
3117187
6778b36
 
 
90eb14c
6778b36
3117187
 
6778b36
3117187
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
35
36
37
38
FROM python:3.9-slim

# 1. Install system dependencies
RUN apt-get update && apt-get install -y \
    espeak-ng \
    git \
    libsndfile1 \
    curl

# 2. Configure environment
ENV PYTHONUNBUFFERED=1 \
    HF_HOME=/app/cache \
    PYTHONPATH="/app"

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

WORKDIR /app

# 4. Install Python dependencies
COPY requirements.txt .

RUN pip install --upgrade pip setuptools wheel && \
    pip install --no-cache-dir -r requirements.txt

# 5. Install misaki from source (with data files)
RUN pip install git+https://github.com/hexgrad/misaki.git --no-cache-dir

# 6. Fix PulseAudio warnings
RUN mkdir -p /.config/pulse && \
    chmod -R 777 /.config

# 7. Copy application code
COPY . .

# 8. Run FastAPI
CMD uvicorn app:app --host 0.0.0.0 --port 7860