|
|
|
|
|
FROM python:3.9.13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
|
ffmpeg \ |
|
|
git \ |
|
|
curl \ |
|
|
wget \ |
|
|
libgl1 \ |
|
|
&& apt-get clean \ |
|
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
|
|
|
RUN useradd -m -u 1000 user |
|
|
USER user |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ENV HOME=/home/user \ |
|
|
PATH=/home/user/.local/bin:$PATH \ |
|
|
NUMBA_CACHE_DIR=/tmp/numba_cache \ |
|
|
NVIDIA_VISIBLE_DEVICES=all \ |
|
|
NVIDIA_DRIVER_CAPABILITIES=compute,utility |
|
|
|
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
|
|
|
COPY --chown=user . $HOME/app |
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt |
|
|
|
|
|
|
|
|
RUN pip install huggingface_hub && \ |
|
|
huggingface-cli download ByteDance/LatentSync --local-dir checkpoints --exclude "*.git*" "README.md" --include "latentsync_unet.pt" "whisper/tiny.pt" |
|
|
|
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
|
|
|
|
|
|
CMD ["gunicorn", "-w", "2", "-k", "gevent", "-b", "0.0.0.0:7860", "--timeout", "600", "app:app"] |
|
|
|