|
|
|
@ -0,0 +1,28 @@
|
|
|
|
|
# 基于Miniconda3镜像
|
|
|
|
|
FROM continuumio/miniconda3
|
|
|
|
|
|
|
|
|
|
# 设置工作目录
|
|
|
|
|
WORKDIR /SadTalker
|
|
|
|
|
|
|
|
|
|
# 复制项目文件到容器中
|
|
|
|
|
COPY . /SadTalker
|
|
|
|
|
|
|
|
|
|
# 创建并激活Conda环境,安装必要的依赖
|
|
|
|
|
RUN conda create --name sadtalker python=3.8 -y && \
|
|
|
|
|
echo "source activate sadtalker" > ~/.bashrc && \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get install -y libgl1-mesa-glx && \
|
|
|
|
|
apt-get install -y build-essential gfortran libatlas-base-dev libblas-dev liblapack-dev libffi-dev libssl-dev && \
|
|
|
|
|
apt-get install -y ffmpeg
|
|
|
|
|
|
|
|
|
|
RUN pip install torch==2.1.2+cu118 torchaudio==2.1.2+cu118 torchvision==0.16.2+cu118 -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
|
|
|
|
|
|
|
RUN pip install tb-nightly
|
|
|
|
|
|
|
|
|
|
RUN pip install basicsr==1.4.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
|
|
|
|
|
|
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
EXPOSE 8000
|
|
|
|
|
|
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|