File size: 1,200 Bytes
4f3aeaa
 
 
 
 
 
 
 
 
819759c
4f3aeaa
 
819759c
4f3aeaa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM debian:bookworm-slim AS builder

RUN apt-get update && \
    apt-get install -y curl git python3 python3-pip python3-venv && \
    rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* && \
    mkdir -p /AdvancedLivePortrait-WebUI

WORKDIR /AdvancedLivePortrait-WebUI

# Edit requirements-cpu.txt if you're not using Nvidia GPU
COPY requirements.txt .

# Edit requirements-cpu.txt if you're not using Nvidia GPU
RUN python3 -m venv venv && \
    . venv/bin/activate && \
    pip install --no-cache-dir -r requirements.txt


FROM debian:bookworm-slim AS runtime

RUN apt-get update && \
    apt-get install -y curl ffmpeg python3 && \
    rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*

WORKDIR /AdvancedLivePortrait-WebUI

COPY . .
COPY --from=builder /AdvancedLivePortrait-WebUI/venv /AdvancedLivePortrait-WebUI/venv

VOLUME [ "/AdvancedLivePortrait-WebUI/models" ]
VOLUME [ "/AdvancedLivePortrait-WebUI/outputs" ]

ENV PATH="/AdvancedLivePortrait-WebUI/venv/bin:$PATH"
ENV LD_LIBRARY_PATH=/AdvancedLivePortrait-WebUI/venv/lib64/python3.11/site-packages/nvidia/cublas/lib:AdvancedLivePortrait-WebUI/venv/lib64/python3.11/site-packages/nvidia/cudnn/lib

ENTRYPOINT [ "python", "app.py" ]