multimodalart HF staff commited on
Commit
c3add7a
·
verified ·
1 Parent(s): 67c14ba

Create DOCKERFILE

Browse files
Files changed (1) hide show
  1. DOCKERFILE +55 -0
DOCKERFILE ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
2
+
3
+ # Set environment variables
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+ ENV PYTHONUNBUFFERED=1
6
+ ENV CONDA_DIR=/opt/conda
7
+ ENV PATH=$CONDA_DIR/bin:$PATH
8
+
9
+ # Install system dependencies
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ git \
12
+ git-lfs \
13
+ wget \
14
+ curl \
15
+ ca-certificates \
16
+ build-essential \
17
+ libsndfile1 \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # Install Miniconda
21
+ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
22
+ /bin/bash ~/miniconda.sh -b -p $CONDA_DIR && \
23
+ rm ~/miniconda.sh && \
24
+ conda clean -tipsy
25
+
26
+ # Create conda environment
27
+ RUN conda create -n yue python=3.8 -y
28
+ SHELL ["conda", "run", "-n", "yue", "/bin/bash", "-c"]
29
+
30
+ # Install PyTorch with CUDA support
31
+ RUN conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia -y
32
+
33
+ # Install flash-attention
34
+ RUN pip install flash-attn --no-build-isolation
35
+
36
+ # Clone YuE repository and install dependencies
37
+ WORKDIR /app
38
+ RUN git lfs install && \
39
+ git clone https://github.com/multimodal-art-projection/YuE.git && \
40
+ cd YuE && \
41
+ pip install -r requirements.txt
42
+
43
+ # Clone xcodec_mini_infer
44
+ WORKDIR /app/YuE/inference
45
+ RUN git clone https://huggingface.co/m-a-p/xcodec_mini_infer
46
+
47
+ # Create output directory
48
+ RUN mkdir -p /app/output
49
+
50
+ # Copy entry script and wrapper
51
+ COPY run.sh /app/
52
+ COPY wrapper.py /app/YuE/inference/
53
+ RUN chmod +x /app/run.sh
54
+
55
+ ENTRYPOINT ["/app/run.sh"]