roll-ai commited on
Commit
76f7f2a
·
verified ·
1 Parent(s): fbe1ab9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -7
Dockerfile CHANGED
@@ -1,11 +1,13 @@
1
  FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
 
2
  ENV DEBIAN_FRONTEND=noninteractive \
3
  PATH=/opt/conda/bin:$PATH \
4
  CUDA_HOME=/usr/local/cuda
5
 
6
  # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
- wget git libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg build-essential \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
  # Install Miniconda
@@ -14,23 +16,25 @@ RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86
14
  rm /tmp/miniconda.sh && \
15
  conda clean -afy
16
 
17
- # Configure conda to avoid Anaconda TOS prompt
18
- RUN conda config --remove channels defaults && \
 
 
19
  conda config --add channels conda-forge && \
20
  conda config --set channel_priority strict
21
 
22
- # Create conda environment with Python + ffmpeg from conda-forge
23
  RUN conda create -n appenv python=3.10 ffmpeg=7 -y && conda clean -afy
24
  SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
25
 
26
- # Copy requirements first for layer caching
27
  WORKDIR /workspace
28
  COPY requirements.txt .
29
 
30
- # Install Python dependencies (flash-attn will compile since we have nvcc)
31
  RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
32
 
33
- # Copy remaining code
34
  COPY . .
35
 
36
  CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"]
 
1
  FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
2
+ # Non-interactive APT installs
3
  ENV DEBIAN_FRONTEND=noninteractive \
4
  PATH=/opt/conda/bin:$PATH \
5
  CUDA_HOME=/usr/local/cuda
6
 
7
  # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
+ wget git build-essential \
10
+ libgl1-mesa-glx libgl1-mesa-dri xvfb ffmpeg \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Install Miniconda
 
16
  rm /tmp/miniconda.sh && \
17
  conda clean -afy
18
 
19
+ # Remove ALL Anaconda default channels to skip TOS prompt
20
+ RUN conda config --remove channels defaults || true && \
21
+ conda config --remove channels https://repo.anaconda.com/pkgs/main || true && \
22
+ conda config --remove channels https://repo.anaconda.com/pkgs/r || true && \
23
  conda config --add channels conda-forge && \
24
  conda config --set channel_priority strict
25
 
26
+ # Create environment from conda-forge only
27
  RUN conda create -n appenv python=3.10 ffmpeg=7 -y && conda clean -afy
28
  SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
29
 
30
+ # Copy requirements first (for Docker layer caching)
31
  WORKDIR /workspace
32
  COPY requirements.txt .
33
 
34
+ # Install Python dependencies (flash-attn compiles here)
35
  RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
36
 
37
+ # Copy rest of project files
38
  COPY . .
39
 
40
  CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"]