File size: 922 Bytes
5eeae8b
5060891
5eeae8b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337d4b1
 
5eeae8b
337d4b1
5eeae8b
337d4b1
5eeae8b
337d4b1
5eeae8b
 
 
 
 
 
 
 
 
 
337d4b1
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
# Build Stage for Frontend
FROM node:20-slim AS frontend-build
WORKDIR /app/frontend
COPY dubbing_frontend/package*.json ./
RUN npm install
COPY dubbing_frontend/ ./
RUN npm run build

# Final Stage
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
    ffmpeg \
    build-essential \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy Backend
COPY requirements.txt ./
COPY dubbing_backend/requirements.txt ./dubbing_backend_reqs.txt
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir -r dubbing_backend_reqs.txt

COPY dubbing_backend/ ./dubbing_backend/
COPY pipeline/ ./pipeline/
COPY app.py ./

# Copy Frontend Build
COPY --from=frontend-build /app/frontend/dist ./dist

# Create workspace directory
RUN mkdir -p workspace

EXPOSE 7860

# Run uvicorn on port 7860 (required by HF)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]