| FROM nvidia/cuda:12.6.3-devel-ubuntu22.04 |
|
|
| LABEL authors="jaret" |
|
|
| |
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| RUN apt-get update && apt-get install --no-install-recommends -y \ |
| git \ |
| curl \ |
| build-essential \ |
| cmake \ |
| wget \ |
| python3.10 \ |
| python3-pip \ |
| python3-dev \ |
| python3-setuptools \ |
| python3-wheel \ |
| python3-venv \ |
| ffmpeg \ |
| tmux \ |
| htop \ |
| nvtop \ |
| python3-opencv \ |
| openssh-client \ |
| openssh-server \ |
| openssl \ |
| rsync \ |
| unzip \ |
| && apt-get clean \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| WORKDIR /tmp |
| RUN curl -sL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh && \ |
| bash nodesource_setup.sh && \ |
| apt-get update && \ |
| apt-get install -y nodejs && \ |
| apt-get clean && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| RUN ln -s /usr/bin/python3 /usr/bin/python |
|
|
| |
| RUN pip install --no-cache-dir torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu126 |
|
|
| |
| ARG CACHEBUST=1234 |
| RUN echo "Cache bust: ${CACHEBUST}" && \ |
| git clone https://github.com/ostris/ai-toolkit.git && \ |
| cd ai-toolkit |
|
|
| WORKDIR /app/ai-toolkit |
|
|
| |
| RUN pip install --no-cache-dir -r requirements.txt && \ |
| pip install flash-attn --no-build-isolation --no-cache-dir |
|
|
| |
| WORKDIR /app/ai-toolkit/ui |
| RUN npm install && \ |
| npm run build && \ |
| npm run update_db |
|
|
| |
| EXPOSE 8675 |
|
|
| WORKDIR / |
|
|
| COPY docker/start.sh /start.sh |
| RUN chmod +x /start.sh |
|
|
| CMD ["/start.sh"] |