mrbear1024 commited on
Commit
761daf8
·
1 Parent(s): 2d94f6c

fixbug dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -11
Dockerfile CHANGED
@@ -1,26 +1,28 @@
1
  FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
2
 
3
- # 基础依赖
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  wget \
7
  ffmpeg \
8
  libsndfile1 \
9
- python3-pip \
10
  bzip2 \
 
 
 
 
 
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # 安装 Miniconda
14
- RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh \
15
- && bash miniconda.sh -b -p /opt/conda \
16
- && rm miniconda.sh
17
 
18
- ENV PATH=/opt/conda/bin:$PATH
19
-
20
- # 创建 conda 环境
21
  RUN conda create -n mimictalk python=3.9 -y
22
 
23
- # 显式使用 conda run 安装依赖(不设置 SHELL
24
  RUN conda run -n mimictalk pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121
25
  RUN conda run -n mimictalk pip install cython openmim==0.3.9
26
  RUN conda run -n mimictalk mim install mmcv==2.1.0
@@ -38,5 +40,5 @@ RUN conda run -n mimictalk pip install huggingface_hub && \
38
  COPY . /app
39
  WORKDIR /app
40
 
41
- # 启动命令
42
  CMD ["/opt/conda/bin/conda", "run", "--no-capture-output", "-n", "mimictalk", "python", "inference/app_mimictalk.py"]
 
1
  FROM nvidia/cuda:12.1.0-runtime-ubuntu22.04
2
 
3
+ # 安装基础依赖和 Miniconda(来自 conda-forge 的 deb 包)
4
  RUN apt-get update && apt-get install -y \
5
  git \
6
  wget \
7
  ffmpeg \
8
  libsndfile1 \
 
9
  bzip2 \
10
+ curl \
11
+ ca-certificates \
12
+ software-properties-common \
13
+ && curl -fsSL https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -o /tmp/miniconda.sh \
14
+ && bash /tmp/miniconda.sh -b -p /opt/conda \
15
+ && rm /tmp/miniconda.sh \
16
+ && apt-get clean \
17
  && rm -rf /var/lib/apt/lists/*
18
 
19
+ # 添加 conda 到 PATH
20
+ ENV PATH="/opt/conda/bin:$PATH"
 
 
21
 
22
+ # 创建 conda 虚拟环境
 
 
23
  RUN conda create -n mimictalk python=3.9 -y
24
 
25
+ # 安装 Python 依赖(用 conda run)
26
  RUN conda run -n mimictalk pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121
27
  RUN conda run -n mimictalk pip install cython openmim==0.3.9
28
  RUN conda run -n mimictalk mim install mmcv==2.1.0
 
40
  COPY . /app
41
  WORKDIR /app
42
 
43
+ # 启动命令(通过 conda 运行 Python 脚本)
44
  CMD ["/opt/conda/bin/conda", "run", "--no-capture-output", "-n", "mimictalk", "python", "inference/app_mimictalk.py"]