Spaces:
Build error
Build error
Commit
·
f22069d
1
Parent(s):
8eb4303
add dockerfile
Browse files- Dockerfile +43 -0
Dockerfile
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:12.1.0-devel-ubuntu22.04
|
2 |
+
|
3 |
+
ENV CONDA_DIR /opt/conda
|
4 |
+
ENV PATH $CONDA_DIR/bin:$PATH
|
5 |
+
|
6 |
+
# Install system dependencies
|
7 |
+
RUN apt-get update && apt-get install -y \
|
8 |
+
wget \
|
9 |
+
git \
|
10 |
+
&& rm -rf /var/lib/apt/lists/*
|
11 |
+
|
12 |
+
# Install Miniconda
|
13 |
+
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
|
14 |
+
/bin/bash ~/miniconda.sh -b -p $CONDA_DIR && \
|
15 |
+
rm ~/miniconda.sh
|
16 |
+
|
17 |
+
# Create and activate mimictalk environment
|
18 |
+
RUN conda create -n mimictalk python=3.9 -y
|
19 |
+
SHELL ["conda", "run", "-n", "mimictalk", "/bin/bash", "-c"]
|
20 |
+
|
21 |
+
# Install PyTorch and other dependencies
|
22 |
+
RUN pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu121 && \
|
23 |
+
pip install cython && \
|
24 |
+
pip install openmim==0.3.9
|
25 |
+
|
26 |
+
# Install MMCV
|
27 |
+
RUN mim install mmcv==2.1.0
|
28 |
+
|
29 |
+
# Install PyTorch3D
|
30 |
+
RUN pip install "git+https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
|
31 |
+
/bin/bash ~/miniconda.sh -b -p $CONDA_DIR && \
|
32 |
+
rm ~/miniconda.sh"
|
33 |
+
|
34 |
+
# Copy requirements.txt and install dependencies
|
35 |
+
COPY docs/prepare_env/requirements.txt .
|
36 |
+
RUN pip install -r requirements.txt -v
|
37 |
+
|
38 |
+
WORKDIR /workspace
|
39 |
+
# Copy source code
|
40 |
+
COPY . .
|
41 |
+
|
42 |
+
# Set default command to run app_mimictalk
|
43 |
+
CMD ["conda", "run", "-n", "mimictalk", "python", "inference/app_mimictalk.py"]
|