Spaces:
Runtime error
Runtime error
FROM nvidia/cuda:12.1.0-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 && \ | |
conda clean -afy | |
# Configure conda to avoid Anaconda TOS prompt | |
RUN conda config --remove channels defaults && \ | |
conda config --add channels conda-forge && \ | |
conda config --set channel_priority strict | |
# Create conda environment with Python + ffmpeg from conda-forge | |
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 layer caching | |
WORKDIR /workspace | |
COPY requirements.txt . | |
# Install Python dependencies (flash-attn will compile since we have nvcc) | |
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt | |
# Copy remaining code | |
COPY . . | |
CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/app.py"] | |