File size: 1,361 Bytes
f22069d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04

ENV CONDA_DIR /opt/conda
ENV PATH $CONDA_DIR/bin:$PATH

# Install system dependencies
RUN apt-get update && apt-get install -y \
    wget \
    git \
    && rm -rf /var/lib/apt/lists/*

# Install Miniconda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
    /bin/bash ~/miniconda.sh -b -p $CONDA_DIR && \
    rm ~/miniconda.sh

# Create and activate mimictalk environment
RUN conda create -n mimictalk python=3.9 -y
SHELL ["conda", "run", "-n", "mimictalk", "/bin/bash", "-c"]

# Install PyTorch and other dependencies
RUN pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121 && \
    pip install cython && \
    pip install openmim==0.3.9

# Install MMCV
RUN mim install mmcv==2.1.0

# Install PyTorch3D
RUN pip install "git+https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
    /bin/bash ~/miniconda.sh -b -p $CONDA_DIR && \
    rm ~/miniconda.sh"

# Copy requirements.txt and install dependencies
COPY docs/prepare_env/requirements.txt .
RUN pip install -r requirements.txt -v

WORKDIR /workspace
# Copy source code
COPY . .

# Set default command to run app_mimictalk
CMD ["conda", "run", "-n", "mimictalk", "python", "inference/app_mimictalk.py"]