RealCam-I2V / Dockerfile
roll-ai's picture
Update Dockerfile
f354c49 verified
raw
history blame
1.69 kB
FROM nvidia/cuda:12.1.0-cudnn8-devel-ubuntu22.04
# Non-interactive APT installs
# Avoid any apt interactive prompts
ENV DEBIAN_FRONTEND=noninteractive \
PATH=/opt/conda/bin:$PATH \
CUDA_HOME=/usr/local/cuda
# Install system packages
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 (system + user configs)
RUN rm -f /opt/conda/.condarc && \
conda config --system --remove-key channels || true && \
conda config --remove-key channels || true && \
conda config --system --add channels conda-forge && \
conda config --system --set channel_priority strict && \
conda config --add channels conda-forge && \
conda config --set channel_priority strict
# This prevents Conda from auto-adding defaults during env creation
ENV CONDA_FORGE=1 \
CONDA_AUTO_UPDATE_CONDA=false
# Create environment using ONLY conda-forge
RUN conda create --override-channels -n appenv -c conda-forge python=3.10 ffmpeg=7 -y && conda clean -afy
SHELL ["conda", "run", "-n", "appenv", "/bin/bash", "-c"]
# Copy requirements
WORKDIR /workspace
COPY requirements.txt .
# Install pip dependencies
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt
# Copy rest of code
COPY . .
CMD ["conda", "run", "--no-capture-output", "-n", "appenv", "python", "finetune/gradio_app.py"]