add docker
This commit is contained in:
parent
007601704d
commit
deac619d5b
|
@ -0,0 +1,55 @@
|
||||||
|
# Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
|
||||||
|
#
|
||||||
|
# NVIDIA CORPORATION and its licensors retain all intellectual property
|
||||||
|
# and proprietary rights in and to this software, related documentation
|
||||||
|
# and any modifications thereto. Any use, reproduction, disclosure or
|
||||||
|
# distribution of this software and related documentation without an express
|
||||||
|
# license agreement from NVIDIA CORPORATION is strictly prohibited.
|
||||||
|
|
||||||
|
ARG BASE_IMAGE=nvcr.io/nvidia/cuda:11.6.1-cudnn8-devel-ubuntu20.04
|
||||||
|
FROM $BASE_IMAGE
|
||||||
|
|
||||||
|
RUN apt-get update -yq --fix-missing \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
|
||||||
|
pkg-config \
|
||||||
|
wget \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
git \
|
||||||
|
vim
|
||||||
|
|
||||||
|
#ENV PYTHONDONTWRITEBYTECODE=1
|
||||||
|
#ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
# nvidia-container-runtime
|
||||||
|
#ENV NVIDIA_VISIBLE_DEVICES all
|
||||||
|
#ENV NVIDIA_DRIVER_CAPABILITIES compute,utility,graphics
|
||||||
|
|
||||||
|
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
|
||||||
|
RUN sh Miniconda3-latest-Linux-x86_64.sh -b -u -p ~/miniconda3
|
||||||
|
RUN ~/miniconda3/bin/conda init
|
||||||
|
RUN source ~/.bashrc
|
||||||
|
RUN conda create -n nerfstream python=3.10
|
||||||
|
RUN conda activate nerfstream
|
||||||
|
|
||||||
|
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
||||||
|
# install depend
|
||||||
|
RUN conda install pytorch==1.12.1 torchvision==0.13.1 cudatoolkit=11.3 -c pytorch
|
||||||
|
Copy requirements.txt ./
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
# additional libraries
|
||||||
|
RUN pip install "git+https://github.com/facebookresearch/pytorch3d.git"
|
||||||
|
RUN pip install tensorflow-gpu==2.8.0
|
||||||
|
|
||||||
|
RUN pip uninstall protobuf
|
||||||
|
RUN pip install protobuf==3.20.1
|
||||||
|
|
||||||
|
RUN conda install ffmpeg
|
||||||
|
Copy ../python_rtmpstream /python_rtmpstream
|
||||||
|
WORKDIR /python_rtmpstream/python
|
||||||
|
RUN pip install .
|
||||||
|
|
||||||
|
Copy ../nerfstream /nerfstream
|
||||||
|
WORKDIR /nerfstream
|
||||||
|
CMD ["python3", "app.py"]
|
|
@ -58,6 +58,13 @@ python app.py
|
||||||
|
|
||||||
用浏览器打开http://serverip/echo.html,在文本框输入任意文字,提交。数字人播报该段文字
|
用浏览器打开http://serverip/echo.html,在文本框输入任意文字,提交。数字人播报该段文字
|
||||||
|
|
||||||
|
### docker运行
|
||||||
|
先运行srs和nginx
|
||||||
|
启动数字人
|
||||||
|
```
|
||||||
|
docker run --gpus all -it --network=host --rm registry.cn-hangzhou.aliyuncs.com/lipku/nerfstream:v1.2
|
||||||
|
```
|
||||||
|
|
||||||
## Data flow
|
## Data flow
|
||||||
![](/assets/dataflow.png)
|
![](/assets/dataflow.png)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import torch
|
||||||
import torch.nn.functional as F
|
import torch.nn.functional as F
|
||||||
from transformers import AutoModelForCTC, AutoProcessor
|
from transformers import AutoModelForCTC, AutoProcessor
|
||||||
|
|
||||||
import pyaudio
|
#import pyaudio
|
||||||
import soundfile as sf
|
import soundfile as sf
|
||||||
import resampy
|
import resampy
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ face_alignment
|
||||||
python_speech_features
|
python_speech_features
|
||||||
numba
|
numba
|
||||||
resampy
|
resampy
|
||||||
pyaudio
|
#pyaudio
|
||||||
soundfile
|
soundfile
|
||||||
einops
|
einops
|
||||||
configargparse
|
configargparse
|
||||||
|
@ -30,3 +30,4 @@ transformers
|
||||||
edge_tts
|
edge_tts
|
||||||
flask
|
flask
|
||||||
flask_sockets
|
flask_sockets
|
||||||
|
opencv-python-headless
|
||||||
|
|
Loading…
Reference in New Issue