File size: 1,115 Bytes
cb33a1e
14964a5
cb33a1e
 
 
c94624b
cb33a1e
 
 
 
c94624b
cb33a1e
 
 
 
 
4e5a345
cb33a1e
 
 
4e5a345
cb33a1e
 
4e5a345
cb33a1e
 
 
4e5a345
cb33a1e
 
4e5a345
cb33a1e
 
 
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
FROM nvidia/cuda:12.1.105-cudnn8-devel-ubuntu22.04

ENV DEBIAN_FRONTEND=noninteractive \
    PATH=/opt/conda/bin:$PATH \
    CUDA_HOME=/usr/local/cuda

# Install system dependencies
RUN apt-get update && apt-get install -y \
    wget git libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg build-essential \
    && rm -rf /var/lib/apt/lists/*

# Install Miniconda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh && \
    bash /tmp/miniconda.sh -b -p /opt/conda && \
    rm /tmp/miniconda.sh && \
    /opt/conda/bin/conda clean -afy

# Create conda env
RUN conda create -n appenv python=3.10 -y && conda clean -afy
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]

# Install ffmpeg from conda-forge
RUN conda install ffmpeg=7 -c conda-forge -y && conda clean -afy

# Copy project
WORKDIR /workspace
COPY requirements.txt .

# Install Python dependencies (flash-attn will now compile)
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt

COPY . .

CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "app.py"]