File size: 1,517 Bytes
e15b087
76f7f2a
cb33a1e
 
 
c94624b
cb33a1e
 
76f7f2a
 
cb33a1e
c94624b
cb33a1e
 
 
 
fbe1ab9
4e5a345
76f7f2a
 
 
 
fbe1ab9
 
4e5a345
76f7f2a
fbe1ab9
 
4e5a345
76f7f2a
cb33a1e
 
4e5a345
76f7f2a
cb33a1e
4e5a345
76f7f2a
cb33a1e
 
17a613b
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
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
# Non-interactive APT installs
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 build-essential \
    libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg \
    && 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 && \
    conda clean -afy

# Remove ALL Anaconda default channels to skip TOS prompt
RUN conda config --remove channels defaults || true && \
    conda config --remove channels https://repo.anaconda.com/pkgs/main || true && \
    conda config --remove channels https://repo.anaconda.com/pkgs/r || true && \
    conda config --add channels conda-forge && \
    conda config --set channel_priority strict

# Create environment from conda-forge only
RUN conda create -n appenv python=3.10 ffmpeg=7 -y && conda clean -afy
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]

# Copy requirements first (for Docker layer caching)
WORKDIR /workspace
COPY requirements.txt .

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

# Copy rest of project files
COPY . .

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