Spaces:
Runtime error
Runtime error
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"] | |