File size: 896 Bytes
e1f2709
f9d2354
 
 
4fd675b
f9d2354
 
 
 
61a447c
6a822bc
88e59b2
 
f9d2354
 
3f170f0
6242c02
ba4a241
 
 
2d830d1
ba4a241
 
 
f9d2354
3f170f0
 
 
55e88bd
ba4a241
3f170f0
4fd675b
 
f9d2354
ba4a241
f9d2354
ba4a241
f9d2354
ba4a241
 
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
39
40
FROM python:3.10-slim

WORKDIR /app

# Install system packages
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    git \
    ffmpeg \
    libsndfile1 \
    cmake \
    libopenblas-dev \
    && rm -rf /var/lib/apt/lists/*

ENV HOME=/tmp
ENV HF_HOME=/tmp/huggingface
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH="/app/src"
ENV PORT=7860

# Create writable directories used at runtime
RUN mkdir -p /tmp/huggingface /app/static /app/static/audio /app/tmp && \
    chmod -R 777 /tmp /app/static /app/tmp

# Copy files
COPY requirements.txt ./
COPY src/ ./src/
COPY static/ ./static/
COPY frontend/ ./frontend/

# Install Python dependencies
RUN pip3 install --no-cache-dir -r requirements.txt

EXPOSE 7860

HEALTHCHECK CMD curl --fail http://localhost:7860/health || exit 1

ENTRYPOINT ["python", "-m", "uvicorn", "src.server.main:app"]
CMD ["--host", "0.0.0.0", "--port", "7860"]