From f7efa06d98867ab07e672fc44cb393c957e745c4 Mon Sep 17 00:00:00 2001 From: fanpt <320622572@qq.com> Date: Fri, 14 Jun 2024 09:32:27 +0800 Subject: [PATCH] dockerfile --- Dockerfile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9d44d30 --- /dev/null +++ b/Dockerfile @@ -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"] \ No newline at end of file